Class SynthesizeSpeechConfig.Builder (0.1.0)

public static final class SynthesizeSpeechConfig.Builder extends GeneratedMessage.Builder<SynthesizeSpeechConfig.Builder> implements SynthesizeSpeechConfigOrBuilder

Configuration for how the agent response should be synthesized.

Protobuf type google.cloud.ces.v1.SynthesizeSpeechConfig

Static Methods

getDescriptor()

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

Methods

build()

public SynthesizeSpeechConfig build()
Returns
Type Description
SynthesizeSpeechConfig

buildPartial()

public SynthesizeSpeechConfig buildPartial()
Returns
Type Description
SynthesizeSpeechConfig

clear()

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

clearSpeakingRate()

public SynthesizeSpeechConfig.Builder clearSpeakingRate()

Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error.

double speaking_rate = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SynthesizeSpeechConfig.Builder

This builder for chaining.

clearVoice()

public SynthesizeSpeechConfig.Builder clearVoice()

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

string voice = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SynthesizeSpeechConfig.Builder

This builder for chaining.

getDefaultInstanceForType()

public SynthesizeSpeechConfig getDefaultInstanceForType()
Returns
Type Description
SynthesizeSpeechConfig

getDescriptorForType()

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

getSpeakingRate()

public double getSpeakingRate()

Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error.

double speaking_rate = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
double

The speakingRate.

getVoice()

public String getVoice()

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

string voice = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The voice.

getVoiceBytes()

public ByteString getVoiceBytes()

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

string voice = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for voice.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SynthesizeSpeechConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setSpeakingRate(double value)

public SynthesizeSpeechConfig.Builder setSpeakingRate(double value)

Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error.

double speaking_rate = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value double

The speakingRate to set.

Returns
Type Description
SynthesizeSpeechConfig.Builder

This builder for chaining.

setVoice(String value)

public SynthesizeSpeechConfig.Builder setVoice(String value)

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

string voice = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The voice to set.

Returns
Type Description
SynthesizeSpeechConfig.Builder

This builder for chaining.

setVoiceBytes(ByteString value)

public SynthesizeSpeechConfig.Builder setVoiceBytes(ByteString value)

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

string voice = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for voice to set.

Returns
Type Description
SynthesizeSpeechConfig.Builder

This builder for chaining.