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

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

Text translation result.

Generated from protobuf message google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ translation string

Output only. The translated sentence.

↳ is_final bool

Output only. If false, this StreamingTranslateSpeechResult represents an interim result that may change. If true, this is the final time the translation service will return this particular StreamingTranslateSpeechResult, the streaming translator will not return any further hypotheses for this portion of the transcript and corresponding audio.

getTranslation

Output only. The translated sentence.

Returns
TypeDescription
string

setTranslation

Output only. The translated sentence.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getIsFinal

Output only. If false, this StreamingTranslateSpeechResult represents an interim result that may change. If true, this is the final time the translation service will return this particular StreamingTranslateSpeechResult, the streaming translator will not return any further hypotheses for this portion of the transcript and corresponding audio.

Returns
TypeDescription
bool

setIsFinal

Output only. If false, this StreamingTranslateSpeechResult represents an interim result that may change. If true, this is the final time the translation service will return this particular StreamingTranslateSpeechResult, the streaming translator will not return any further hypotheses for this portion of the transcript and corresponding audio.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this