Class StreamingAudioConfig.Builder (2.57.0)

public static final class StreamingAudioConfig.Builder extends GeneratedMessageV3.Builder<StreamingAudioConfig.Builder> implements StreamingAudioConfigOrBuilder

Description of the desired output audio data.

Protobuf type google.cloud.texttospeech.v1.StreamingAudioConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingAudioConfig build()
Returns
Type Description
StreamingAudioConfig

buildPartial()

public StreamingAudioConfig buildPartial()
Returns
Type Description
StreamingAudioConfig

clear()

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

clearAudioEncoding()

public StreamingAudioConfig.Builder clearAudioEncoding()

Required. The format of the audio byte stream. For now, streaming only supports PCM and OGG_OPUS. All other encodings will return an error.

.google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StreamingAudioConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSampleRateHertz()

public StreamingAudioConfig.Builder clearSampleRateHertz()

Optional. The synthesis sample rate (in hertz) for this audio.

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

Returns
Type Description
StreamingAudioConfig.Builder

This builder for chaining.

clone()

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

getAudioEncoding()

public AudioEncoding getAudioEncoding()

Required. The format of the audio byte stream. For now, streaming only supports PCM and OGG_OPUS. All other encodings will return an error.

.google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AudioEncoding

The audioEncoding.

getAudioEncodingValue()

public int getAudioEncodingValue()

Required. The format of the audio byte stream. For now, streaming only supports PCM and OGG_OPUS. All other encodings will return an error.

.google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for audioEncoding.

getDefaultInstanceForType()

public StreamingAudioConfig getDefaultInstanceForType()
Returns
Type Description
StreamingAudioConfig

getDescriptorForType()

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

getSampleRateHertz()

public int getSampleRateHertz()

Optional. The synthesis sample rate (in hertz) for this audio.

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

Returns
Type Description
int

The sampleRateHertz.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StreamingAudioConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudioEncoding(AudioEncoding value)

public StreamingAudioConfig.Builder setAudioEncoding(AudioEncoding value)

Required. The format of the audio byte stream. For now, streaming only supports PCM and OGG_OPUS. All other encodings will return an error.

.google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AudioEncoding

The audioEncoding to set.

Returns
Type Description
StreamingAudioConfig.Builder

This builder for chaining.

setAudioEncodingValue(int value)

public StreamingAudioConfig.Builder setAudioEncodingValue(int value)

Required. The format of the audio byte stream. For now, streaming only supports PCM and OGG_OPUS. All other encodings will return an error.

.google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
StreamingAudioConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSampleRateHertz(int value)

public StreamingAudioConfig.Builder setSampleRateHertz(int value)

Optional. The synthesis sample rate (in hertz) for this audio.

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

Parameter
Name Description
value int

The sampleRateHertz to set.

Returns
Type Description
StreamingAudioConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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