Class StreamingTranslateSpeechRequest.Builder (0.52.0)

public static final class StreamingTranslateSpeechRequest.Builder extends GeneratedMessageV3.Builder<StreamingTranslateSpeechRequest.Builder> implements StreamingTranslateSpeechRequestOrBuilder

The top-level message sent by the client for the StreamingTranslateSpeech method. Multiple StreamingTranslateSpeechRequest messages are sent. The first message must contain a streaming_config message and must not contain audio_content data. All subsequent messages must contain audio_content data and must not contain a streaming_config message.

Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingTranslateSpeechRequest build()
Returns
Type Description
StreamingTranslateSpeechRequest

buildPartial()

public StreamingTranslateSpeechRequest buildPartial()
Returns
Type Description
StreamingTranslateSpeechRequest

clear()

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

clearAudioContent()

public StreamingTranslateSpeechRequest.Builder clearAudioContent()

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Returns
Type Description
StreamingTranslateSpeechRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearStreamingConfig()

public StreamingTranslateSpeechRequest.Builder clearStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
Type Description
StreamingTranslateSpeechRequest.Builder

clearStreamingRequest()

public StreamingTranslateSpeechRequest.Builder clearStreamingRequest()
Returns
Type Description
StreamingTranslateSpeechRequest.Builder

clone()

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

getAudioContent()

public ByteString getAudioContent()

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Returns
Type Description
ByteString

The audioContent.

getDefaultInstanceForType()

public StreamingTranslateSpeechRequest getDefaultInstanceForType()
Returns
Type Description
StreamingTranslateSpeechRequest

getDescriptorForType()

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

getStreamingConfig()

public StreamingTranslateSpeechConfig getStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
Type Description
StreamingTranslateSpeechConfig

The streamingConfig.

getStreamingConfigBuilder()

public StreamingTranslateSpeechConfig.Builder getStreamingConfigBuilder()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
Type Description
StreamingTranslateSpeechConfig.Builder

getStreamingConfigOrBuilder()

public StreamingTranslateSpeechConfigOrBuilder getStreamingConfigOrBuilder()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
Type Description
StreamingTranslateSpeechConfigOrBuilder

getStreamingRequestCase()

public StreamingTranslateSpeechRequest.StreamingRequestCase getStreamingRequestCase()
Returns
Type Description
StreamingTranslateSpeechRequest.StreamingRequestCase

hasAudioContent()

public boolean hasAudioContent()

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Returns
Type Description
boolean

Whether the audioContent field is set.

hasStreamingConfig()

public boolean hasStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
Type Description
boolean

Whether the streamingConfig field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StreamingTranslateSpeechRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStreamingConfig(StreamingTranslateSpeechConfig value)

public StreamingTranslateSpeechRequest.Builder mergeStreamingConfig(StreamingTranslateSpeechConfig value)

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Parameter
Name Description
value StreamingTranslateSpeechConfig
Returns
Type Description
StreamingTranslateSpeechRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudioContent(ByteString value)

public StreamingTranslateSpeechRequest.Builder setAudioContent(ByteString value)

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Parameter
Name Description
value ByteString

The audioContent to set.

Returns
Type Description
StreamingTranslateSpeechRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setStreamingConfig(StreamingTranslateSpeechConfig value)

public StreamingTranslateSpeechRequest.Builder setStreamingConfig(StreamingTranslateSpeechConfig value)

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Parameter
Name Description
value StreamingTranslateSpeechConfig
Returns
Type Description
StreamingTranslateSpeechRequest.Builder

setStreamingConfig(StreamingTranslateSpeechConfig.Builder builderForValue)

public StreamingTranslateSpeechRequest.Builder setStreamingConfig(StreamingTranslateSpeechConfig.Builder builderForValue)

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Parameter
Name Description
builderForValue StreamingTranslateSpeechConfig.Builder
Returns
Type Description
StreamingTranslateSpeechRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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