Class OutputAudioConfig.Builder (4.7.5)

public static final class OutputAudioConfig.Builder extends GeneratedMessageV3.Builder<OutputAudioConfig.Builder> implements OutputAudioConfigOrBuilder

Instructs the speech synthesizer on how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.

Protobuf type google.cloud.dialogflow.v2.OutputAudioConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OutputAudioConfig build()
Returns
TypeDescription
OutputAudioConfig

buildPartial()

public OutputAudioConfig buildPartial()
Returns
TypeDescription
OutputAudioConfig

clear()

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

clearAudioEncoding()

public OutputAudioConfig.Builder clearAudioEncoding()

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OutputAudioConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSampleRateHertz()

public OutputAudioConfig.Builder clearSampleRateHertz()

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 = 2;

Returns
TypeDescription
OutputAudioConfig.Builder

This builder for chaining.

clearSynthesizeSpeechConfig()

public OutputAudioConfig.Builder clearSynthesizeSpeechConfig()

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Returns
TypeDescription
OutputAudioConfig.Builder

clone()

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

getAudioEncoding()

public OutputAudioEncoding getAudioEncoding()

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OutputAudioEncoding

The audioEncoding.

getAudioEncodingValue()

public int getAudioEncodingValue()

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for audioEncoding.

getDefaultInstanceForType()

public OutputAudioConfig getDefaultInstanceForType()
Returns
TypeDescription
OutputAudioConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSampleRateHertz()

public int getSampleRateHertz()

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 = 2;

Returns
TypeDescription
int

The sampleRateHertz.

getSynthesizeSpeechConfig()

public SynthesizeSpeechConfig getSynthesizeSpeechConfig()

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Returns
TypeDescription
SynthesizeSpeechConfig

The synthesizeSpeechConfig.

getSynthesizeSpeechConfigBuilder()

public SynthesizeSpeechConfig.Builder getSynthesizeSpeechConfigBuilder()

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Returns
TypeDescription
SynthesizeSpeechConfig.Builder

getSynthesizeSpeechConfigOrBuilder()

public SynthesizeSpeechConfigOrBuilder getSynthesizeSpeechConfigOrBuilder()

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Returns
TypeDescription
SynthesizeSpeechConfigOrBuilder

hasSynthesizeSpeechConfig()

public boolean hasSynthesizeSpeechConfig()

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Returns
TypeDescription
boolean

Whether the synthesizeSpeechConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OutputAudioConfig other)

public OutputAudioConfig.Builder mergeFrom(OutputAudioConfig other)
Parameter
NameDescription
otherOutputAudioConfig
Returns
TypeDescription
OutputAudioConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSynthesizeSpeechConfig(SynthesizeSpeechConfig value)

public OutputAudioConfig.Builder mergeSynthesizeSpeechConfig(SynthesizeSpeechConfig value)

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Parameter
NameDescription
valueSynthesizeSpeechConfig
Returns
TypeDescription
OutputAudioConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudioEncoding(OutputAudioEncoding value)

public OutputAudioConfig.Builder setAudioEncoding(OutputAudioEncoding value)

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueOutputAudioEncoding

The audioEncoding to set.

Returns
TypeDescription
OutputAudioConfig.Builder

This builder for chaining.

setAudioEncodingValue(int value)

public OutputAudioConfig.Builder setAudioEncodingValue(int value)

Required. Audio encoding of the synthesized audio content.

.google.cloud.dialogflow.v2.OutputAudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
OutputAudioConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSampleRateHertz(int value)

public OutputAudioConfig.Builder setSampleRateHertz(int value)

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 = 2;

Parameter
NameDescription
valueint

The sampleRateHertz to set.

Returns
TypeDescription
OutputAudioConfig.Builder

This builder for chaining.

setSynthesizeSpeechConfig(SynthesizeSpeechConfig value)

public OutputAudioConfig.Builder setSynthesizeSpeechConfig(SynthesizeSpeechConfig value)

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Parameter
NameDescription
valueSynthesizeSpeechConfig
Returns
TypeDescription
OutputAudioConfig.Builder

setSynthesizeSpeechConfig(SynthesizeSpeechConfig.Builder builderForValue)

public OutputAudioConfig.Builder setSynthesizeSpeechConfig(SynthesizeSpeechConfig.Builder builderForValue)

Configuration of how speech should be synthesized.

.google.cloud.dialogflow.v2.SynthesizeSpeechConfig synthesize_speech_config = 3;

Parameter
NameDescription
builderForValueSynthesizeSpeechConfig.Builder
Returns
TypeDescription
OutputAudioConfig.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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