Class TextToSpeechSettings.Builder (4.7.5)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TextToSpeechSettings build()
Returns
TypeDescription
TextToSpeechSettings

buildPartial()

public TextToSpeechSettings buildPartial()
Returns
TypeDescription
TextToSpeechSettings

clear()

public TextToSpeechSettings.Builder clear()
Returns
TypeDescription
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
TypeDescription
TextToSpeechSettings.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public TextToSpeechSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TextToSpeechSettings.Builder

This builder for chaining.

clearSynthesizeSpeechConfigs()

public TextToSpeechSettings.Builder clearSynthesizeSpeechConfigs()
Returns
TypeDescription
TextToSpeechSettings.Builder

clone()

public TextToSpeechSettings.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public TextToSpeechSettings getDefaultInstanceForType()
Returns
TypeDescription
TextToSpeechSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
boolean

The enableTextToSpeech.

getMutableSynthesizeSpeechConfigs()

public Map<String,SynthesizeSpeechConfig> getMutableSynthesizeSpeechConfigs()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
int

The sampleRateHertz.

getSynthesizeSpeechConfigs()

public Map<String,SynthesizeSpeechConfig> getSynthesizeSpeechConfigs()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueSynthesizeSpeechConfig
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
SynthesizeSpeechConfig

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TextToSpeechSettings other)

public TextToSpeechSettings.Builder mergeFrom(TextToSpeechSettings other)
Parameter
NameDescription
otherTextToSpeechSettings
Returns
TypeDescription
TextToSpeechSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextToSpeechSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,SynthesizeSpeechConfig>
Returns
TypeDescription
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
NameDescription
keyString
valueSynthesizeSpeechConfig
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
valueboolean

The enableTextToSpeech to set.

Returns
TypeDescription
TextToSpeechSettings.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TextToSpeechSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueOutputAudioEncoding

The outputAudioEncoding to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The sampleRateHertz to set.

Returns
TypeDescription
TextToSpeechSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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