Class TextToSpeechSettings.Builder (4.33.0)

public static final class TextToSpeechSettings.Builder extends GeneratedMessageV3.Builder<TextToSpeechSettings.Builder> implements TextToSpeechSettingsOrBuilder

Instructs the speech synthesizer on how to generate the output audio content.

Protobuf type google.cloud.dialogflow.v2beta1.TextToSpeechSettings

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TextToSpeechSettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

build()

public TextToSpeechSettings build()
Returns
Type Description
TextToSpeechSettings

buildPartial()

public TextToSpeechSettings buildPartial()
Returns
Type Description
TextToSpeechSettings

clear()

public TextToSpeechSettings.Builder clear()
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

clearEnableTextToSpeech()

public TextToSpeechSettings.Builder clearEnableTextToSpeech()

Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.

bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TextToSpeechSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TextToSpeechSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

clearOutputAudioEncoding()

public TextToSpeechSettings.Builder clearOutputAudioEncoding()

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2beta1.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

clearSampleRateHertz()

public TextToSpeechSettings.Builder clearSampleRateHertz()

Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).

int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

clearSynthesizeSpeechConfigs()

public TextToSpeechSettings.Builder clearSynthesizeSpeechConfigs()
Returns
Type Description
TextToSpeechSettings.Builder

clone()

public TextToSpeechSettings.Builder clone()
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

containsSynthesizeSpeechConfigs(String key)

public boolean containsSynthesizeSpeechConfigs(String key)

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public TextToSpeechSettings getDefaultInstanceForType()
Returns
Type Description
TextToSpeechSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnableTextToSpeech()

public boolean getEnableTextToSpeech()

Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.

bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The enableTextToSpeech.

getMutableSynthesizeSpeechConfigs()

public Map<String,SynthesizeSpeechConfig> getMutableSynthesizeSpeechConfigs()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,SynthesizeSpeechConfig>

getOutputAudioEncoding()

public OutputAudioEncoding getOutputAudioEncoding()

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2beta1.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OutputAudioEncoding

The outputAudioEncoding.

getOutputAudioEncodingValue()

public int getOutputAudioEncodingValue()

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2beta1.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for outputAudioEncoding.

getSampleRateHertz()

public int getSampleRateHertz()

Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).

int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The sampleRateHertz.

getSynthesizeSpeechConfigs()

public Map<String,SynthesizeSpeechConfig> getSynthesizeSpeechConfigs()
Returns
Type Description
Map<String,SynthesizeSpeechConfig>

getSynthesizeSpeechConfigsCount()

public int getSynthesizeSpeechConfigsCount()

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getSynthesizeSpeechConfigsMap()

public Map<String,SynthesizeSpeechConfig> getSynthesizeSpeechConfigsMap()

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,SynthesizeSpeechConfig>

getSynthesizeSpeechConfigsOrDefault(String key, SynthesizeSpeechConfig defaultValue)

public SynthesizeSpeechConfig getSynthesizeSpeechConfigsOrDefault(String key, SynthesizeSpeechConfig defaultValue)

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue SynthesizeSpeechConfig
Returns
Type Description
SynthesizeSpeechConfig

getSynthesizeSpeechConfigsOrThrow(String key)

public SynthesizeSpeechConfig getSynthesizeSpeechConfigsOrThrow(String key)

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
SynthesizeSpeechConfig

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TextToSpeechSettings other)

public TextToSpeechSettings.Builder mergeFrom(TextToSpeechSettings other)
Parameter
Name Description
other TextToSpeechSettings
Returns
Type Description
TextToSpeechSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TextToSpeechSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextToSpeechSettings.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TextToSpeechSettings.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextToSpeechSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

putAllSynthesizeSpeechConfigs(Map<String,SynthesizeSpeechConfig> values)

public TextToSpeechSettings.Builder putAllSynthesizeSpeechConfigs(Map<String,SynthesizeSpeechConfig> values)

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,SynthesizeSpeechConfig>
Returns
Type Description
TextToSpeechSettings.Builder

putSynthesizeSpeechConfigs(String key, SynthesizeSpeechConfig value)

public TextToSpeechSettings.Builder putSynthesizeSpeechConfigs(String key, SynthesizeSpeechConfig value)

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value SynthesizeSpeechConfig
Returns
Type Description
TextToSpeechSettings.Builder

removeSynthesizeSpeechConfigs(String key)

public TextToSpeechSettings.Builder removeSynthesizeSpeechConfigs(String key)

Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

map<string, .google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
TextToSpeechSettings.Builder

setEnableTextToSpeech(boolean value)

public TextToSpeechSettings.Builder setEnableTextToSpeech(boolean value)

Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.

bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The enableTextToSpeech to set.

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TextToSpeechSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

setOutputAudioEncoding(OutputAudioEncoding value)

public TextToSpeechSettings.Builder setOutputAudioEncoding(OutputAudioEncoding value)

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2beta1.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value OutputAudioEncoding

The outputAudioEncoding to set.

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

setOutputAudioEncodingValue(int value)

public TextToSpeechSettings.Builder setOutputAudioEncodingValue(int value)

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2beta1.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

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

public TextToSpeechSettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TextToSpeechSettings.Builder
Overrides

setSampleRateHertz(int value)

public TextToSpeechSettings.Builder setSampleRateHertz(int value)

Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).

int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The sampleRateHertz to set.

Returns
Type Description
TextToSpeechSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final TextToSpeechSettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextToSpeechSettings.Builder
Overrides