public static final class VoiceSelectionParams.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder> implements VoiceSelectionParamsOrBuilder
Description of which voice to use for a synthesis request.Protobuf type
google.cloud.texttospeech.v1.VoiceSelectionParams| Modifier and Type | Method and Description |
|---|---|
VoiceSelectionParams.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
VoiceSelectionParams |
build() |
VoiceSelectionParams |
buildPartial() |
VoiceSelectionParams.Builder |
clear() |
VoiceSelectionParams.Builder |
clearCustomVoice()
The configuration for a custom voice.
|
VoiceSelectionParams.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
VoiceSelectionParams.Builder |
clearLanguageCode()
Required.
|
VoiceSelectionParams.Builder |
clearName()
The name of the voice.
|
VoiceSelectionParams.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
VoiceSelectionParams.Builder |
clearSsmlGender()
The preferred gender of the voice.
|
VoiceSelectionParams.Builder |
clone() |
CustomVoiceParams |
getCustomVoice()
The configuration for a custom voice.
|
CustomVoiceParams.Builder |
getCustomVoiceBuilder()
The configuration for a custom voice.
|
CustomVoiceParamsOrBuilder |
getCustomVoiceOrBuilder()
The configuration for a custom voice.
|
VoiceSelectionParams |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getLanguageCode()
Required.
|
com.google.protobuf.ByteString |
getLanguageCodeBytes()
Required.
|
String |
getName()
The name of the voice.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the voice.
|
SsmlVoiceGender |
getSsmlGender()
The preferred gender of the voice.
|
int |
getSsmlGenderValue()
The preferred gender of the voice.
|
boolean |
hasCustomVoice()
The configuration for a custom voice.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
VoiceSelectionParams.Builder |
mergeCustomVoice(CustomVoiceParams value)
The configuration for a custom voice.
|
VoiceSelectionParams.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
VoiceSelectionParams.Builder |
mergeFrom(com.google.protobuf.Message other) |
VoiceSelectionParams.Builder |
mergeFrom(VoiceSelectionParams other) |
VoiceSelectionParams.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
VoiceSelectionParams.Builder |
setCustomVoice(CustomVoiceParams.Builder builderForValue)
The configuration for a custom voice.
|
VoiceSelectionParams.Builder |
setCustomVoice(CustomVoiceParams value)
The configuration for a custom voice.
|
VoiceSelectionParams.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
VoiceSelectionParams.Builder |
setLanguageCode(String value)
Required.
|
VoiceSelectionParams.Builder |
setLanguageCodeBytes(com.google.protobuf.ByteString value)
Required.
|
VoiceSelectionParams.Builder |
setName(String value)
The name of the voice.
|
VoiceSelectionParams.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The name of the voice.
|
VoiceSelectionParams.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
VoiceSelectionParams.Builder |
setSsmlGender(SsmlVoiceGender value)
The preferred gender of the voice.
|
VoiceSelectionParams.Builder |
setSsmlGenderValue(int value)
The preferred gender of the voice.
|
VoiceSelectionParams.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic VoiceSelectionParams build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic VoiceSelectionParams buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic VoiceSelectionParams.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder mergeFrom(VoiceSelectionParams other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public VoiceSelectionParams.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<VoiceSelectionParams.Builder>IOExceptionpublic 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 VoiceSelectionParamsOrBuilderpublic com.google.protobuf.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 VoiceSelectionParamsOrBuilderpublic 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(com.google.protobuf.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 VoiceSelectionParamsOrBuilderpublic com.google.protobuf.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 VoiceSelectionParamsOrBuilderpublic 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(com.google.protobuf.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 VoiceSelectionParamsOrBuilderpublic 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 VoiceSelectionParamsOrBuilderpublic 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 VoiceSelectionParamsOrBuilderpublic 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 VoiceSelectionParamsOrBuilderpublic 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 VoiceSelectionParamsOrBuilderpublic final VoiceSelectionParams.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>public final VoiceSelectionParams.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<VoiceSelectionParams.Builder>Copyright © 2024 Google LLC. All rights reserved.