Class Voice.Builder (2.2.1)

public static final class Voice.Builder extends GeneratedMessageV3.Builder<Voice.Builder> implements VoiceOrBuilder

Description of a voice supported by the TTS service.

Protobuf type google.cloud.texttospeech.v1beta1.Voice

Implements

VoiceOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllLanguageCodes(Iterable<String> values)

public Voice.Builder addAllLanguageCodes(Iterable<String> values)

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Parameter
NameDescription
valuesIterable<String>

The languageCodes to add.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

addLanguageCodes(String value)

public Voice.Builder addLanguageCodes(String value)

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Parameter
NameDescription
valueString

The languageCodes to add.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

addLanguageCodesBytes(ByteString value)

public Voice.Builder addLanguageCodesBytes(ByteString value)

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Parameter
NameDescription
valueByteString

The bytes of the languageCodes to add.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Voice.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Voice.Builder
Overrides

build()

public Voice build()
Returns
TypeDescription
Voice

buildPartial()

public Voice buildPartial()
Returns
TypeDescription
Voice

clear()

public Voice.Builder clear()
Returns
TypeDescription
Voice.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Voice.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Voice.Builder
Overrides

clearLanguageCodes()

public Voice.Builder clearLanguageCodes()

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Returns
TypeDescription
Voice.Builder

This builder for chaining.

clearName()

public Voice.Builder clearName()

The name of this voice. Each distinct voice has a unique name.

string name = 2;

Returns
TypeDescription
Voice.Builder

This builder for chaining.

clearNaturalSampleRateHertz()

public Voice.Builder clearNaturalSampleRateHertz()

The natural sample rate (in hertz) for this voice.

int32 natural_sample_rate_hertz = 4;

Returns
TypeDescription
Voice.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Voice.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Voice.Builder
Overrides

clearSsmlGender()

public Voice.Builder clearSsmlGender()

The gender of this voice.

.google.cloud.texttospeech.v1beta1.SsmlVoiceGender ssml_gender = 3;

Returns
TypeDescription
Voice.Builder

This builder for chaining.

clone()

public Voice.Builder clone()
Returns
TypeDescription
Voice.Builder
Overrides

getDefaultInstanceForType()

public Voice getDefaultInstanceForType()
Returns
TypeDescription
Voice

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLanguageCodes(int index)

public String getLanguageCodes(int index)

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The languageCodes at the given index.

getLanguageCodesBytes(int index)

public ByteString getLanguageCodesBytes(int index)

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the languageCodes at the given index.

getLanguageCodesCount()

public int getLanguageCodesCount()

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Returns
TypeDescription
int

The count of languageCodes.

getLanguageCodesList()

public ProtocolStringList getLanguageCodesList()

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the languageCodes.

getName()

public String getName()

The name of this voice. Each distinct voice has a unique name.

string name = 2;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of this voice. Each distinct voice has a unique name.

string name = 2;

Returns
TypeDescription
ByteString

The bytes for name.

getNaturalSampleRateHertz()

public int getNaturalSampleRateHertz()

The natural sample rate (in hertz) for this voice.

int32 natural_sample_rate_hertz = 4;

Returns
TypeDescription
int

The naturalSampleRateHertz.

getSsmlGender()

public SsmlVoiceGender getSsmlGender()

The gender of this voice.

.google.cloud.texttospeech.v1beta1.SsmlVoiceGender ssml_gender = 3;

Returns
TypeDescription
SsmlVoiceGender

The ssmlGender.

getSsmlGenderValue()

public int getSsmlGenderValue()

The gender of this voice.

.google.cloud.texttospeech.v1beta1.SsmlVoiceGender ssml_gender = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for ssmlGender.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Voice other)

public Voice.Builder mergeFrom(Voice other)
Parameter
NameDescription
otherVoice
Returns
TypeDescription
Voice.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Voice.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Voice.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Voice.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Voice.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Voice.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Voice.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Voice.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Voice.Builder
Overrides

setLanguageCodes(int index, String value)

public Voice.Builder setLanguageCodes(int index, String value)

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

repeated string language_codes = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The languageCodes to set.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

setName(String value)

public Voice.Builder setName(String value)

The name of this voice. Each distinct voice has a unique name.

string name = 2;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Voice.Builder setNameBytes(ByteString value)

The name of this voice. Each distinct voice has a unique name.

string name = 2;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

setNaturalSampleRateHertz(int value)

public Voice.Builder setNaturalSampleRateHertz(int value)

The natural sample rate (in hertz) for this voice.

int32 natural_sample_rate_hertz = 4;

Parameter
NameDescription
valueint

The naturalSampleRateHertz to set.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Voice.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Voice.Builder
Overrides

setSsmlGender(SsmlVoiceGender value)

public Voice.Builder setSsmlGender(SsmlVoiceGender value)

The gender of this voice.

.google.cloud.texttospeech.v1beta1.SsmlVoiceGender ssml_gender = 3;

Parameter
NameDescription
valueSsmlVoiceGender

The ssmlGender to set.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

setSsmlGenderValue(int value)

public Voice.Builder setSsmlGenderValue(int value)

The gender of this voice.

.google.cloud.texttospeech.v1beta1.SsmlVoiceGender ssml_gender = 3;

Parameter
NameDescription
valueint

The enum numeric value on the wire for ssmlGender to set.

Returns
TypeDescription
Voice.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Voice.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Voice.Builder
Overrides