Class StreamingTranslateSpeechResponse (0.11.0)

public final class StreamingTranslateSpeechResponse extends GeneratedMessageV3 implements StreamingTranslateSpeechResponseOrBuilder

A streaming speech translation response corresponding to a portion of the audio currently processed.

Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse

Inheritance

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

Static Fields

ERROR_FIELD_NUMBER

public static final int ERROR_FIELD_NUMBER
Field Value
TypeDescription
int

RESULT_FIELD_NUMBER

public static final int RESULT_FIELD_NUMBER
Field Value
TypeDescription
int

SPEECH_EVENT_TYPE_FIELD_NUMBER

public static final int SPEECH_EVENT_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StreamingTranslateSpeechResponse getDefaultInstance()
Returns
TypeDescription
StreamingTranslateSpeechResponse

getDescriptor()

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

newBuilder()

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

newBuilder(StreamingTranslateSpeechResponse prototype)

public static StreamingTranslateSpeechResponse.Builder newBuilder(StreamingTranslateSpeechResponse prototype)
Parameter
NameDescription
prototypeStreamingTranslateSpeechResponse
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public StreamingTranslateSpeechResponse getDefaultInstanceForType()
Returns
TypeDescription
StreamingTranslateSpeechResponse

getError()

public Status getError()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.Status

The error.

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getParserForType()

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

getResult()

public StreamingTranslateSpeechResult getResult()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StreamingTranslateSpeechResult

The result.

getResultOrBuilder()

public StreamingTranslateSpeechResultOrBuilder getResultOrBuilder()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StreamingTranslateSpeechResultOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSpeechEventType()

public StreamingTranslateSpeechResponse.SpeechEventType getSpeechEventType()

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StreamingTranslateSpeechResponse.SpeechEventType

The speechEventType.

getSpeechEventTypeValue()

public int getSpeechEventTypeValue()

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for speechEventType.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasError()

public boolean hasError()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the error field is set.

hasResult()

public boolean hasResult()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the result 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 StreamingTranslateSpeechResponse.Builder newBuilderForType()
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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