Class StreamingTranslateSpeechRequest (0.26.0)

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > StreamingTranslateSpeechRequest

Static Fields

AUDIO_CONTENT_FIELD_NUMBER

public static final int AUDIO_CONTENT_FIELD_NUMBER
Field Value
TypeDescription
int

STREAMING_CONFIG_FIELD_NUMBER

public static final int STREAMING_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StreamingTranslateSpeechRequest getDefaultInstance()
Returns
TypeDescription
StreamingTranslateSpeechRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static StreamingTranslateSpeechRequest.Builder newBuilder()
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

newBuilder(StreamingTranslateSpeechRequest prototype)

public static StreamingTranslateSpeechRequest.Builder newBuilder(StreamingTranslateSpeechRequest prototype)
Parameter
NameDescription
prototypeStreamingTranslateSpeechRequest
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

parseDelimitedFrom(InputStream input)

public static StreamingTranslateSpeechRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StreamingTranslateSpeechRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamingTranslateSpeechRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamingTranslateSpeechRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StreamingTranslateSpeechRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StreamingTranslateSpeechRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StreamingTranslateSpeechRequest> parser()
Returns
TypeDescription
Parser<StreamingTranslateSpeechRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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
TypeDescription
ByteString

The audioContent.

getDefaultInstanceForType()

public StreamingTranslateSpeechRequest getDefaultInstanceForType()
Returns
TypeDescription
StreamingTranslateSpeechRequest

getParserForType()

public Parser<StreamingTranslateSpeechRequest> getParserForType()
Returns
TypeDescription
Parser<StreamingTranslateSpeechRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
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
TypeDescription
StreamingTranslateSpeechConfig

The streamingConfig.

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
TypeDescription
StreamingTranslateSpeechConfigOrBuilder

getStreamingRequestCase()

public StreamingTranslateSpeechRequest.StreamingRequestCase getStreamingRequestCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the streamingConfig field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public StreamingTranslateSpeechRequest.Builder newBuilderForType()
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StreamingTranslateSpeechRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public StreamingTranslateSpeechRequest.Builder toBuilder()
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException