- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.52.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.9
- 2.3.0
- 2.2.1
- 2.1.5
public static final class VoiceSelectionParams.Builder extends GeneratedMessageV3.Builder<VoiceSelectionParams.Builder> implements VoiceSelectionParamsOrBuilder
Description of which voice to use for a synthesis request.
Protobuf type google.cloud.texttospeech.v1.VoiceSelectionParams
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > VoiceSelectionParams.BuilderImplements
VoiceSelectionParamsOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public VoiceSelectionParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
VoiceSelectionParams.Builder |
build()
public VoiceSelectionParams build()
Type | Description |
VoiceSelectionParams |
buildPartial()
public VoiceSelectionParams buildPartial()
Type | Description |
VoiceSelectionParams |
clear()
public VoiceSelectionParams.Builder clear()
Type | Description |
VoiceSelectionParams.Builder |
clearCustomVoice()
public VoiceSelectionParams.Builder clearCustomVoice()
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Type | Description |
VoiceSelectionParams.Builder |
clearField(Descriptors.FieldDescriptor field)
public VoiceSelectionParams.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
VoiceSelectionParams.Builder |
clearLanguageCode()
public VoiceSelectionParams.Builder clearLanguageCode()
Required. The language (and potentially also the region) of the voice expressed as a BCP-47 language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
string language_code = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
clearName()
public VoiceSelectionParams.Builder clearName()
The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.
string name = 2;
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public VoiceSelectionParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
VoiceSelectionParams.Builder |
clearSsmlGender()
public VoiceSelectionParams.Builder clearSsmlGender()
The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
clone()
public VoiceSelectionParams.Builder clone()
Type | Description |
VoiceSelectionParams.Builder |
getCustomVoice()
public CustomVoiceParams getCustomVoice()
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Type | Description |
CustomVoiceParams | The customVoice. |
getCustomVoiceBuilder()
public CustomVoiceParams.Builder getCustomVoiceBuilder()
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Type | Description |
CustomVoiceParams.Builder |
getCustomVoiceOrBuilder()
public CustomVoiceParamsOrBuilder getCustomVoiceOrBuilder()
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Type | Description |
CustomVoiceParamsOrBuilder |
getDefaultInstanceForType()
public VoiceSelectionParams getDefaultInstanceForType()
Type | Description |
VoiceSelectionParams |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getLanguageCode()
public String getLanguageCode()
Required. The language (and potentially also the region) of the voice expressed as a BCP-47 language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
string language_code = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
String | The languageCode. |
getLanguageCodeBytes()
public ByteString getLanguageCodeBytes()
Required. The language (and potentially also the region) of the voice expressed as a BCP-47 language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
string language_code = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
ByteString | The bytes for languageCode. |
getName()
public String getName()
The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.
string name = 2;
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.
string name = 2;
Type | Description |
ByteString | The bytes for name. |
getSsmlGender()
public SsmlVoiceGender getSsmlGender()
The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
Type | Description |
SsmlVoiceGender | The ssmlGender. |
getSsmlGenderValue()
public int getSsmlGenderValue()
The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
Type | Description |
int | The enum numeric value on the wire for ssmlGender. |
hasCustomVoice()
public boolean hasCustomVoice()
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Type | Description |
boolean | Whether the customVoice field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeCustomVoice(CustomVoiceParams value)
public VoiceSelectionParams.Builder mergeCustomVoice(CustomVoiceParams value)
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Name | Description |
value | CustomVoiceParams |
Type | Description |
VoiceSelectionParams.Builder |
mergeFrom(VoiceSelectionParams other)
public VoiceSelectionParams.Builder mergeFrom(VoiceSelectionParams other)
Name | Description |
other | VoiceSelectionParams |
Type | Description |
VoiceSelectionParams.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public VoiceSelectionParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
VoiceSelectionParams.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public VoiceSelectionParams.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
VoiceSelectionParams.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final VoiceSelectionParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
VoiceSelectionParams.Builder |
setCustomVoice(CustomVoiceParams value)
public VoiceSelectionParams.Builder setCustomVoice(CustomVoiceParams value)
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Name | Description |
value | CustomVoiceParams |
Type | Description |
VoiceSelectionParams.Builder |
setCustomVoice(CustomVoiceParams.Builder builderForValue)
public VoiceSelectionParams.Builder setCustomVoice(CustomVoiceParams.Builder builderForValue)
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
.google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
Name | Description |
builderForValue | CustomVoiceParams.Builder |
Type | Description |
VoiceSelectionParams.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public VoiceSelectionParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
VoiceSelectionParams.Builder |
setLanguageCode(String value)
public VoiceSelectionParams.Builder setLanguageCode(String value)
Required. The language (and potentially also the region) of the voice expressed as a BCP-47 language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
string language_code = 1 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The languageCode to set. |
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
setLanguageCodeBytes(ByteString value)
public VoiceSelectionParams.Builder setLanguageCodeBytes(ByteString value)
Required. The language (and potentially also the region) of the voice expressed as a BCP-47 language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
string language_code = 1 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for languageCode to set. |
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
setName(String value)
public VoiceSelectionParams.Builder setName(String value)
The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.
string name = 2;
Name | Description |
value | String The name to set. |
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public VoiceSelectionParams.Builder setNameBytes(ByteString value)
The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.
string name = 2;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public VoiceSelectionParams.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
VoiceSelectionParams.Builder |
setSsmlGender(SsmlVoiceGender value)
public VoiceSelectionParams.Builder setSsmlGender(SsmlVoiceGender value)
The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
Name | Description |
value | SsmlVoiceGender The ssmlGender to set. |
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
setSsmlGenderValue(int value)
public VoiceSelectionParams.Builder setSsmlGenderValue(int value)
The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
Name | Description |
value | int The enum numeric value on the wire for ssmlGender to set. |
Type | Description |
VoiceSelectionParams.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final VoiceSelectionParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
VoiceSelectionParams.Builder |