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()
Methods
public StreamingTranslateSpeechRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public StreamingTranslateSpeechRequest build()
public StreamingTranslateSpeechRequest buildPartial()
public StreamingTranslateSpeechRequest.Builder clear()
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;
public StreamingTranslateSpeechRequest.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
public StreamingTranslateSpeechRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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;
public StreamingTranslateSpeechRequest.Builder clearStreamingRequest()
public StreamingTranslateSpeechRequest.Builder clone()
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;
public StreamingTranslateSpeechRequest getDefaultInstanceForType()
public Descriptors.Descriptor getDescriptorForType()
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;
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;
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;
public StreamingTranslateSpeechRequest.StreamingRequestCase getStreamingRequestCase()
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()
Overrides
public final boolean isInitialized()
Overrides
public StreamingTranslateSpeechRequest.Builder mergeFrom(StreamingTranslateSpeechRequest other)
public StreamingTranslateSpeechRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public StreamingTranslateSpeechRequest.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
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;
public final StreamingTranslateSpeechRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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.
|
public StreamingTranslateSpeechRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
public StreamingTranslateSpeechRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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;
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;
public final StreamingTranslateSpeechRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides