Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

feat: Add ALAW support on client library. And improve the ListVoiceRequest message's documentation #412

Merged
merged 1 commit into from Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -152,12 +152,13 @@ public TextToSpeechStub getStub() {
* }</pre>
*
* @param languageCode Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If specified, the
* ListVoices call will only return voices that can be used to synthesize this language_code.
* E.g. when specifying "en-NZ", you will get supported "en-\\&#42;" voices; when specifying
* "no", you will get supported "no-\\&#42;" (Norwegian) and "nb-\\&#42;" (Norwegian Bokmal)
* voices; specifying "zh" will also get supported "cmn-\\&#42;" voices; specifying "zh-hk"
* will also get supported "yue-\\&#42;" voices.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If not specified, the
* API will return all supported voices. If specified, the ListVoices call will only return
* voices that can be used to synthesize this language_code. E.g. when specifying "en-NZ", you
* will get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-\\&#42;" (Norwegian) and "nb-\\&#42;" (Norwegian Bokmal) voices; specifying "zh" will
* also get supported "cmn-\\&#42;" voices; specifying "zh-hk" will also get supported
* "yue-hk" voices.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListVoicesResponse listVoices(String languageCode) {
Expand Down
Expand Up @@ -94,6 +94,17 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
* <code>MULAW = 5;</code>
*/
MULAW(5),
/**
*
*
* <pre>
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
* Audio content returned as ALAW also contains a WAV header.
* </pre>
*
* <code>ALAW = 6;</code>
*/
ALAW(6),
UNRECOGNIZED(-1),
;

Expand Down Expand Up @@ -162,6 +173,17 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
* <code>MULAW = 5;</code>
*/
public static final int MULAW_VALUE = 5;
/**
*
*
* <pre>
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
* Audio content returned as ALAW also contains a WAV header.
* </pre>
*
* <code>ALAW = 6;</code>
*/
public static final int ALAW_VALUE = 6;

public final int getNumber() {
if (this == UNRECOGNIZED) {
Expand Down Expand Up @@ -199,6 +221,8 @@ public static AudioEncoding forNumber(int value) {
return OGG_OPUS;
case 5:
return MULAW;
case 6:
return ALAW;
default:
return null;
}
Expand Down
Expand Up @@ -118,13 +118,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand All @@ -148,13 +149,14 @@ public java.lang.String getLanguageCode() {
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand Down Expand Up @@ -499,13 +501,14 @@ public Builder mergeFrom(
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand All @@ -528,13 +531,14 @@ public java.lang.String getLanguageCode() {
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand All @@ -557,13 +561,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() {
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand All @@ -585,13 +590,14 @@ public Builder setLanguageCode(java.lang.String value) {
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand All @@ -609,13 +615,14 @@ public Builder clearLanguageCode() {
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand Down
Expand Up @@ -28,13 +28,14 @@ public interface ListVoicesRequestOrBuilder
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand All @@ -47,13 +48,14 @@ public interface ListVoicesRequestOrBuilder
*
* <pre>
* Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
* specified, the ListVoices call will only return voices that can be used to
* synthesize this language_code. E.g. when specifying "en-NZ", you will get
* supported "en-&#92;*" voices; when specifying "no", you will get supported
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
* If not specified, the API will return all supported voices.
* If specified, the ListVoices call will only return voices that can be used
* to synthesize this language_code. E.g. when specifying "en-NZ", you will
* get supported "en-NZ" voices; when specifying "no", you will get supported
* "no-&#92;*" (Norwegian) and "nb-&#92;*" (Norwegian Bokmal) voices; specifying "zh"
* will also get supported "cmn-&#92;*" voices; specifying "zh-hk" will also get
* supported "yue-&#92;*" voices.
* supported "yue-hk" voices.
* </pre>
*
* <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
Expand Down
Expand Up @@ -508,7 +508,7 @@ public com.google.cloud.texttospeech.v1beta1.AudioConfigOrBuilder getAudioConfig
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -529,7 +529,7 @@ public com.google.cloud.texttospeech.v1beta1.AudioConfigOrBuilder getAudioConfig
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -546,7 +546,7 @@ public int getEnableTimePointingCount() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -565,7 +565,7 @@ public int getEnableTimePointingCount() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -582,7 +582,7 @@ public java.util.List<java.lang.Integer> getEnableTimePointingValueList() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand Down Expand Up @@ -1660,7 +1660,7 @@ private void ensureEnableTimePointingIsMutable() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1681,7 +1681,7 @@ private void ensureEnableTimePointingIsMutable() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1697,7 +1697,7 @@ public int getEnableTimePointingCount() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1715,7 +1715,7 @@ public int getEnableTimePointingCount() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1741,7 +1741,7 @@ public Builder setEnableTimePointing(
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1765,7 +1765,7 @@ public Builder addEnableTimePointing(
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1792,7 +1792,7 @@ public Builder addAllEnableTimePointing(
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1811,7 +1811,7 @@ public Builder clearEnableTimePointing() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1827,7 +1827,7 @@ public java.util.List<java.lang.Integer> getEnableTimePointingValueList() {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1844,7 +1844,7 @@ public int getEnableTimePointingValue(int index) {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1865,7 +1865,7 @@ public Builder setEnableTimePointingValue(int index, int value) {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand All @@ -1885,7 +1885,7 @@ public Builder addEnableTimePointingValue(int value) {
*
*
* <pre>
* Whether and what timepoints should be returned in the response.
* Whether and what timepoints are returned in the response.
* </pre>
*
* <code>
Expand Down