Class StreamingTranslateSpeechResponse (0.11.8)

StreamingTranslateSpeechResponse(
    mapping=None, *, ignore_unknown_fields=False, **kwargs
)

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

Attributes

NameDescription
error google.rpc.status_pb2.Status
Output only. If set, returns a google.rpc.Status][google.rpc.Status] message that specifies the error for the operation.
result google.cloud.mediatranslation_v1beta1.types.StreamingTranslateSpeechResult
Output only. The translation result that is currently being processed (is_final could be true or false).
speech_event_type google.cloud.mediatranslation_v1beta1.types.StreamingTranslateSpeechResponse.SpeechEventType
Output only. Indicates the type of speech event.

Classes

SpeechEventType

SpeechEventType(value)

Indicates the type of speech event.

Values: SPEECH_EVENT_TYPE_UNSPECIFIED (0): No speech event specified. END_OF_SINGLE_UTTERANCE (1): This event indicates that the server has detected the end of the user's speech utterance and expects no additional speech. Therefore, the server will not process additional audio (although it may subsequently return additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should stop sending the requests. However, clients should keep receiving remaining responses until the stream is terminated. To construct the complete sentence in a streaming way, one should override (if 'is_final' of previous response is false), or append (if 'is_final' of previous response is true). This event is only sent if single_utterance was set to true, and is not used otherwise.