Cloud Video Intelligence V1 Client - Class SpeechTranscription (1.12.16)

Reference documentation and code samples for the Cloud Video Intelligence V1 Client class SpeechTranscription.

A speech recognition result corresponding to a portion of the audio.

Generated from protobuf message google.cloud.videointelligence.v1.SpeechTranscription

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ alternatives array<Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative>

May contain one or more recognition hypotheses (up to the maximum specified in max_alternatives). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.

↳ language_code string

Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.

getAlternatives

May contain one or more recognition hypotheses (up to the maximum specified in max_alternatives). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAlternatives

May contain one or more recognition hypotheses (up to the maximum specified in max_alternatives). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.

Parameter
NameDescription
var array<Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative>
Returns
TypeDescription
$this

getLanguageCode

Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.

Returns
TypeDescription
string

setLanguageCode

Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.

Parameter
NameDescription
var string
Returns
TypeDescription
$this