public final class StreamingTranslateSpeechRequest extends GeneratedMessageV3 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 Fields
AUDIO_CONTENT_FIELD_NUMBER
public static final int AUDIO_CONTENT_FIELD_NUMBER
Field Value
public static final int STREAMING_CONFIG_FIELD_NUMBER
Field Value
Static Methods
public static StreamingTranslateSpeechRequest getDefaultInstance()
Returns
public static final Descriptors.Descriptor getDescriptor()
Returns
public static StreamingTranslateSpeechRequest.Builder newBuilder()
Returns
public static StreamingTranslateSpeechRequest.Builder newBuilder(StreamingTranslateSpeechRequest prototype)
Parameter
Returns
public static StreamingTranslateSpeechRequest parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(ByteString data)
Parameter
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
public static StreamingTranslateSpeechRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Parser<StreamingTranslateSpeechRequest> parser()
Returns
Methods
public boolean equals(Object obj)
Parameter
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 Parser<StreamingTranslateSpeechRequest> getParserForType()
Returns
Overrides
public int getSerializedSize()
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 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
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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.
|
Returns
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public StreamingTranslateSpeechRequest.Builder newBuilderForType()
Returns
protected StreamingTranslateSpeechRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public StreamingTranslateSpeechRequest.Builder toBuilder()
Returns
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions