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

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

Methods

__construct

Constructor.

Parameters
NameDescription
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 Google\Cloud\MediaTranslation\V1beta1\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
TypeDescription
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
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this

getResult

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

Returns
TypeDescription
Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult|null

hasResult

clearResult

setResult

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

Parameter
NameDescription
var Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult
Returns
TypeDescription
$this

getSpeechEventType

Output only. Indicates the type of speech event.

Returns
TypeDescription
int

setSpeechEventType

Output only. Indicates the type of speech event.

Parameter
NameDescription
var int
Returns
TypeDescription
$this