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
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public VoiceSelectionParams build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public VoiceSelectionParams buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public VoiceSelectionParams.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder mergeFrom(VoiceSelectionParams other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public VoiceSelectionParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<VoiceSelectionParams.Builder>
IOException
public String getLanguageCode()
Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 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];
getLanguageCode
in interface VoiceSelectionParamsOrBuilder
public ByteString getLanguageCodeBytes()
Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 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];
getLanguageCodeBytes
in interface VoiceSelectionParamsOrBuilder
public VoiceSelectionParams.Builder setLanguageCode(String value)
Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 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];
value
- The languageCode to set.public VoiceSelectionParams.Builder clearLanguageCode()
Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 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];
public VoiceSelectionParams.Builder setLanguageCodeBytes(ByteString value)
Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 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];
value
- The bytes for languageCode to set.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;
getName
in interface VoiceSelectionParamsOrBuilder
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;
getNameBytes
in interface VoiceSelectionParamsOrBuilder
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;
value
- The name to set.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;
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;
value
- The bytes for name to set.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;
getSsmlGenderValue
in interface VoiceSelectionParamsOrBuilder
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;
value
- The enum numeric value on the wire for ssmlGender to set.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;
getSsmlGender
in interface VoiceSelectionParamsOrBuilder
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;
value
- The ssmlGender to set.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;
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;
hasCustomVoice
in interface VoiceSelectionParamsOrBuilder
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;
getCustomVoice
in interface VoiceSelectionParamsOrBuilder
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;
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;
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;
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;
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;
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;
getCustomVoiceOrBuilder
in interface VoiceSelectionParamsOrBuilder
public final VoiceSelectionParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
public final VoiceSelectionParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>
Copyright © 2022 Google LLC. All rights reserved.