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