Class SynthesizeSpeechResponse.Builder (2.42.0)

public static final class SynthesizeSpeechResponse.Builder extends GeneratedMessageV3.Builder<SynthesizeSpeechResponse.Builder> implements SynthesizeSpeechResponseOrBuilder

The message returned to the client by the SynthesizeSpeech method.

Protobuf type google.cloud.texttospeech.v1.SynthesizeSpeechResponse

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SynthesizeSpeechResponse build()
Returns
TypeDescription
SynthesizeSpeechResponse

buildPartial()

public SynthesizeSpeechResponse buildPartial()
Returns
TypeDescription
SynthesizeSpeechResponse

clear()

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

clearAudioContent()

public SynthesizeSpeechResponse.Builder clearAudioContent()

The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes audio_content = 1;

Returns
TypeDescription
SynthesizeSpeechResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAudioContent()

public ByteString getAudioContent()

The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes audio_content = 1;

Returns
TypeDescription
ByteString

The audioContent.

getDefaultInstanceForType()

public SynthesizeSpeechResponse getDefaultInstanceForType()
Returns
TypeDescription
SynthesizeSpeechResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SynthesizeSpeechResponse other)

public SynthesizeSpeechResponse.Builder mergeFrom(SynthesizeSpeechResponse other)
Parameter
NameDescription
otherSynthesizeSpeechResponse
Returns
TypeDescription
SynthesizeSpeechResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudioContent(ByteString value)

public SynthesizeSpeechResponse.Builder setAudioContent(ByteString value)

The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes audio_content = 1;

Parameter
NameDescription
valueByteString

The audioContent to set.

Returns
TypeDescription
SynthesizeSpeechResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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