- 2.54.0 (latest)
- 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()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public VoiceSelectionParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
build()
public VoiceSelectionParams build()
Returns | |
---|---|
Type | Description |
VoiceSelectionParams |
buildPartial()
public VoiceSelectionParams buildPartial()
Returns | |
---|---|
Type | Description |
VoiceSelectionParams |
clear()
public VoiceSelectionParams.Builder clear()
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
clearField(Descriptors.FieldDescriptor field)
public VoiceSelectionParams.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
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];
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
This builder for chaining. |
clearName()
public VoiceSelectionParams.Builder clearName()
The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
string name = 2;
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public VoiceSelectionParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
This builder for chaining. |
clearVoiceClone()
public VoiceSelectionParams.Builder clearVoiceClone()
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
clone()
public VoiceSelectionParams.Builder clone()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
CustomVoiceParamsOrBuilder |
getDefaultInstanceForType()
public VoiceSelectionParams getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
VoiceSelectionParams |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
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];
Returns | |
---|---|
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];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for languageCode. |
getName()
public String getName()
The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
string name = 2;
Returns | |
---|---|
Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()
The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
string name = 2;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
int |
The enum numeric value on the wire for ssmlGender. |
getVoiceClone()
public VoiceCloneParams getVoiceClone()
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
VoiceCloneParams |
The voiceClone. |
getVoiceCloneBuilder()
public VoiceCloneParams.Builder getVoiceCloneBuilder()
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
VoiceCloneParams.Builder |
getVoiceCloneOrBuilder()
public VoiceCloneParamsOrBuilder getVoiceCloneOrBuilder()
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
VoiceCloneParamsOrBuilder |
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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the customVoice field is set. |
hasVoiceClone()
public boolean hasVoiceClone()
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the voiceClone field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
CustomVoiceParams |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
mergeFrom(VoiceSelectionParams other)
public VoiceSelectionParams.Builder mergeFrom(VoiceSelectionParams other)
Parameter | |
---|---|
Name | Description |
other |
VoiceSelectionParams |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public VoiceSelectionParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public VoiceSelectionParams.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final VoiceSelectionParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
mergeVoiceClone(VoiceCloneParams value)
public VoiceSelectionParams.Builder mergeVoiceClone(VoiceCloneParams value)
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
VoiceCloneParams |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
CustomVoiceParams |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue |
CustomVoiceParams.Builder |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public VoiceSelectionParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
value |
String The languageCode to set. |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for languageCode to set. |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
This builder for chaining. |
setName(String value)
public VoiceSelectionParams.Builder setName(String value)
The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
string name = 2;
Parameter | |
---|---|
Name | Description |
value |
String The name to set. |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public VoiceSelectionParams.Builder setNameBytes(ByteString value)
The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
string name = 2;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for name to set. |
Returns | |
---|---|
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)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
SsmlVoiceGender The ssmlGender to set. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
int The enum numeric value on the wire for ssmlGender to set. |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final VoiceSelectionParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
setVoiceClone(VoiceCloneParams value)
public VoiceSelectionParams.Builder setVoiceClone(VoiceCloneParams value)
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
VoiceCloneParams |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |
setVoiceClone(VoiceCloneParams.Builder builderForValue)
public VoiceSelectionParams.Builder setVoiceClone(VoiceCloneParams.Builder builderForValue)
Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
.google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue |
VoiceCloneParams.Builder |
Returns | |
---|---|
Type | Description |
VoiceSelectionParams.Builder |