Google Cloud Media Translation V1beta1 Client - Class StreamingTranslateSpeechResponse (0.4.5)

Reference documentation and code samples for the Google Cloud Media Translation V1beta1 Client class StreamingTranslateSpeechResponse.

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

Generated from protobuf message google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse

Namespace

Google \ Cloud \ MediaTranslation \ V1beta1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ error Google\Rpc\Status

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

↳ result StreamingTranslateSpeechResult

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

↳ speech_event_type int

Output only. Indicates the type of speech event.

getError

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

Returns
Type Description
Google\Rpc\Status|null

hasError

clearError

setError

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

Parameter
Name Description
var Google\Rpc\Status
Returns
Type Description
$this

getResult

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

Returns
Type Description
StreamingTranslateSpeechResult|null

hasResult

clearResult

setResult

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

Parameter
Name Description
var StreamingTranslateSpeechResult
Returns
Type Description
$this

getSpeechEventType

Output only. Indicates the type of speech event.

Returns
Type Description
int

setSpeechEventType

Output only. Indicates the type of speech event.

Parameter
Name Description
var int
Returns
Type Description
$this