Class SynthesizeSpeechRequest.Builder (2.17.0)

public static final class SynthesizeSpeechRequest.Builder extends GeneratedMessageV3.Builder<SynthesizeSpeechRequest.Builder> implements SynthesizeSpeechRequestOrBuilder

The top-level message sent by the client for the SynthesizeSpeech method.

Protobuf type google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest

Static Methods

getDescriptor()

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

Methods

addAllEnableTimePointing(Iterable<? extends SynthesizeSpeechRequest.TimepointType> values)

public SynthesizeSpeechRequest.Builder addAllEnableTimePointing(Iterable<? extends SynthesizeSpeechRequest.TimepointType> values)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType>

The enableTimePointing to add.

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

addAllEnableTimePointingValue(Iterable<Integer> values)

public SynthesizeSpeechRequest.Builder addAllEnableTimePointingValue(Iterable<Integer> values)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for enableTimePointing to add.

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

addEnableTimePointing(SynthesizeSpeechRequest.TimepointType value)

public SynthesizeSpeechRequest.Builder addEnableTimePointing(SynthesizeSpeechRequest.TimepointType value)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameter
NameDescription
valueSynthesizeSpeechRequest.TimepointType

The enableTimePointing to add.

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

addEnableTimePointingValue(int value)

public SynthesizeSpeechRequest.Builder addEnableTimePointingValue(int value)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameter
NameDescription
valueint

The enum numeric value on the wire for enableTimePointing to add.

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SynthesizeSpeechRequest build()
Returns
TypeDescription
SynthesizeSpeechRequest

buildPartial()

public SynthesizeSpeechRequest buildPartial()
Returns
TypeDescription
SynthesizeSpeechRequest

clear()

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

clearAudioConfig()

public SynthesizeSpeechRequest.Builder clearAudioConfig()

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

clearEnableTimePointing()

public SynthesizeSpeechRequest.Builder clearEnableTimePointing()

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInput()

public SynthesizeSpeechRequest.Builder clearInput()

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearVoice()

public SynthesizeSpeechRequest.Builder clearVoice()

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

clone()

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

getAudioConfig()

public AudioConfig getAudioConfig()

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AudioConfig

The audioConfig.

getAudioConfigBuilder()

public AudioConfig.Builder getAudioConfigBuilder()

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AudioConfig.Builder

getAudioConfigOrBuilder()

public AudioConfigOrBuilder getAudioConfigOrBuilder()

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AudioConfigOrBuilder

getDefaultInstanceForType()

public SynthesizeSpeechRequest getDefaultInstanceForType()
Returns
TypeDescription
SynthesizeSpeechRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnableTimePointing(int index)

public SynthesizeSpeechRequest.TimepointType getEnableTimePointing(int index)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
SynthesizeSpeechRequest.TimepointType

The enableTimePointing at the given index.

getEnableTimePointingCount()

public int getEnableTimePointingCount()

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Returns
TypeDescription
int

The count of enableTimePointing.

getEnableTimePointingList()

public List<SynthesizeSpeechRequest.TimepointType> getEnableTimePointingList()

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Returns
TypeDescription
List<TimepointType>

A list containing the enableTimePointing.

getEnableTimePointingValue(int index)

public int getEnableTimePointingValue(int index)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of enableTimePointing at the given index.

getEnableTimePointingValueList()

public List<Integer> getEnableTimePointingValueList()

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for enableTimePointing.

getInput()

public SynthesisInput getInput()

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SynthesisInput

The input.

getInputBuilder()

public SynthesisInput.Builder getInputBuilder()

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SynthesisInput.Builder

getInputOrBuilder()

public SynthesisInputOrBuilder getInputOrBuilder()

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SynthesisInputOrBuilder

getVoice()

public VoiceSelectionParams getVoice()

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
VoiceSelectionParams

The voice.

getVoiceBuilder()

public VoiceSelectionParams.Builder getVoiceBuilder()

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
VoiceSelectionParams.Builder

getVoiceOrBuilder()

public VoiceSelectionParamsOrBuilder getVoiceOrBuilder()

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
VoiceSelectionParamsOrBuilder

hasAudioConfig()

public boolean hasAudioConfig()

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the audioConfig field is set.

hasInput()

public boolean hasInput()

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the input field is set.

hasVoice()

public boolean hasVoice()

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the voice field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAudioConfig(AudioConfig value)

public SynthesizeSpeechRequest.Builder mergeAudioConfig(AudioConfig value)

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueAudioConfig
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

mergeFrom(SynthesizeSpeechRequest other)

public SynthesizeSpeechRequest.Builder mergeFrom(SynthesizeSpeechRequest other)
Parameter
NameDescription
otherSynthesizeSpeechRequest
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeInput(SynthesisInput value)

public SynthesizeSpeechRequest.Builder mergeInput(SynthesisInput value)

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueSynthesisInput
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeVoice(VoiceSelectionParams value)

public SynthesizeSpeechRequest.Builder mergeVoice(VoiceSelectionParams value)

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueVoiceSelectionParams
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

setAudioConfig(AudioConfig value)

public SynthesizeSpeechRequest.Builder setAudioConfig(AudioConfig value)

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueAudioConfig
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

setAudioConfig(AudioConfig.Builder builderForValue)

public SynthesizeSpeechRequest.Builder setAudioConfig(AudioConfig.Builder builderForValue)

Required. The configuration of the synthesized audio.

.google.cloud.texttospeech.v1beta1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueAudioConfig.Builder
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

setEnableTimePointing(int index, SynthesizeSpeechRequest.TimepointType value)

public SynthesizeSpeechRequest.Builder setEnableTimePointing(int index, SynthesizeSpeechRequest.TimepointType value)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueSynthesizeSpeechRequest.TimepointType

The enableTimePointing to set.

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

setEnableTimePointingValue(int index, int value)

public SynthesizeSpeechRequest.Builder setEnableTimePointingValue(int index, int value)

Whether and what timepoints are returned in the response.

repeated .google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType enable_time_pointing = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
SynthesizeSpeechRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInput(SynthesisInput value)

public SynthesizeSpeechRequest.Builder setInput(SynthesisInput value)

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueSynthesisInput
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

setInput(SynthesisInput.Builder builderForValue)

public SynthesizeSpeechRequest.Builder setInput(SynthesisInput.Builder builderForValue)

Required. The Synthesizer requires either plain text or SSML as input.

.google.cloud.texttospeech.v1beta1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueSynthesisInput.Builder
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setVoice(VoiceSelectionParams value)

public SynthesizeSpeechRequest.Builder setVoice(VoiceSelectionParams value)

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueVoiceSelectionParams
Returns
TypeDescription
SynthesizeSpeechRequest.Builder

setVoice(VoiceSelectionParams.Builder builderForValue)

public SynthesizeSpeechRequest.Builder setVoice(VoiceSelectionParams.Builder builderForValue)

Required. The desired voice of the synthesized audio.

.google.cloud.texttospeech.v1beta1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueVoiceSelectionParams.Builder
Returns
TypeDescription
SynthesizeSpeechRequest.Builder