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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
public StreamingTranslateSpeechRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public StreamingTranslateSpeechRequest build()
Returns
public StreamingTranslateSpeechRequest buildPartial()
Returns
public StreamingTranslateSpeechRequest.Builder clear()
Returns
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
public StreamingTranslateSpeechRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public StreamingTranslateSpeechRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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
public StreamingTranslateSpeechRequest.Builder clearStreamingRequest()
Returns
public StreamingTranslateSpeechRequest.Builder clone()
Returns
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
public StreamingTranslateSpeechRequest getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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
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
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
public StreamingTranslateSpeechRequest.StreamingRequestCase getStreamingRequestCase()
Returns
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.
|
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.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public StreamingTranslateSpeechRequest.Builder mergeFrom(StreamingTranslateSpeechRequest other)
Parameter
Returns
public StreamingTranslateSpeechRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public StreamingTranslateSpeechRequest.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
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
Returns
public final StreamingTranslateSpeechRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
public StreamingTranslateSpeechRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public StreamingTranslateSpeechRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
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
Returns
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
Returns
public final StreamingTranslateSpeechRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides