Package com.google.cloud.texttospeech.v1
Class Voice.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
com.google.cloud.texttospeech.v1.Voice.Builder
- All Implemented Interfaces:
VoiceOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Voice
public static final class Voice.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
implements VoiceOrBuilder
Description of a voice supported by the TTS service.Protobuf type
google.cloud.texttospeech.v1.Voice-
Method Summary
Modifier and TypeMethodDescriptionaddAllLanguageCodes(Iterable<String> values) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.addLanguageCodes(String value) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.addLanguageCodesBytes(com.google.protobuf.ByteString value) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.build()clear()The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.The name of this voice.The natural sample rate (in hertz) for this voice.The gender of this voice.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetLanguageCodes(int index) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.com.google.protobuf.ByteStringgetLanguageCodesBytes(int index) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.intThe languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.com.google.protobuf.ProtocolStringListThe languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.getName()The name of this voice.com.google.protobuf.ByteStringThe name of this voice.intThe natural sample rate (in hertz) for this voice.The gender of this voice.intThe gender of this voice.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setLanguageCodes(int index, String value) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.The name of this voice.setNameBytes(com.google.protobuf.ByteString value) The name of this voice.setNaturalSampleRateHertz(int value) The natural sample rate (in hertz) for this voice.setSsmlGender(SsmlVoiceGender value) The gender of this voice.setSsmlGenderValue(int value) The gender of this voice.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Voice.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
-
mergeFrom
public Voice.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Voice.Builder>- Throws:
IOException
-
getLanguageCodesList
public com.google.protobuf.ProtocolStringList getLanguageCodesList()The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Specified by:
getLanguageCodesListin interfaceVoiceOrBuilder- Returns:
- A list containing the languageCodes.
-
getLanguageCodesCount
public int getLanguageCodesCount()The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Specified by:
getLanguageCodesCountin interfaceVoiceOrBuilder- Returns:
- The count of languageCodes.
-
getLanguageCodes
The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Specified by:
getLanguageCodesin interfaceVoiceOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The languageCodes at the given index.
-
getLanguageCodesBytes
public com.google.protobuf.ByteString getLanguageCodesBytes(int index) The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Specified by:
getLanguageCodesBytesin interfaceVoiceOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the languageCodes at the given index.
-
setLanguageCodes
The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Parameters:
index- The index to set the value at.value- The languageCodes to set.- Returns:
- This builder for chaining.
-
addLanguageCodes
The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Parameters:
value- The languageCodes to add.- Returns:
- This builder for chaining.
-
addAllLanguageCodes
The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Parameters:
values- The languageCodes to add.- Returns:
- This builder for chaining.
-
clearLanguageCodes
The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Returns:
- This builder for chaining.
-
addLanguageCodesBytes
The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. "en-US", "es-419", "cmn-tw").
repeated string language_codes = 1;- Parameters:
value- The bytes of the languageCodes to add.- Returns:
- This builder for chaining.
-
getName
The name of this voice. Each distinct voice has a unique name.
string name = 2;- Specified by:
getNamein interfaceVoiceOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of this voice. Each distinct voice has a unique name.
string name = 2;- Specified by:
getNameBytesin interfaceVoiceOrBuilder- Returns:
- The bytes for name.
-
setName
The name of this voice. Each distinct voice has a unique name.
string name = 2;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The name of this voice. Each distinct voice has a unique name.
string name = 2;- Returns:
- This builder for chaining.
-
setNameBytes
The name of this voice. Each distinct voice has a unique name.
string name = 2;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getSsmlGenderValue
public int getSsmlGenderValue()The gender of this voice.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;- Specified by:
getSsmlGenderValuein interfaceVoiceOrBuilder- Returns:
- The enum numeric value on the wire for ssmlGender.
-
setSsmlGenderValue
The gender of this voice.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;- Parameters:
value- The enum numeric value on the wire for ssmlGender to set.- Returns:
- This builder for chaining.
-
getSsmlGender
The gender of this voice.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;- Specified by:
getSsmlGenderin interfaceVoiceOrBuilder- Returns:
- The ssmlGender.
-
setSsmlGender
The gender of this voice.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;- Parameters:
value- The ssmlGender to set.- Returns:
- This builder for chaining.
-
clearSsmlGender
The gender of this voice.
.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;- Returns:
- This builder for chaining.
-
getNaturalSampleRateHertz
public int getNaturalSampleRateHertz()The natural sample rate (in hertz) for this voice.
int32 natural_sample_rate_hertz = 4;- Specified by:
getNaturalSampleRateHertzin interfaceVoiceOrBuilder- Returns:
- The naturalSampleRateHertz.
-
setNaturalSampleRateHertz
The natural sample rate (in hertz) for this voice.
int32 natural_sample_rate_hertz = 4;- Parameters:
value- The naturalSampleRateHertz to set.- Returns:
- This builder for chaining.
-
clearNaturalSampleRateHertz
The natural sample rate (in hertz) for this voice.
int32 natural_sample_rate_hertz = 4;- Returns:
- This builder for chaining.
-