Cloud Speech V2 Client - Class RecognizeResponse (1.14.3)

Reference documentation and code samples for the Cloud Speech V2 Client class RecognizeResponse.

Response message for the Recognize method.

Generated from protobuf message google.cloud.speech.v2.RecognizeResponse

Namespace

Google \ Cloud \ Speech \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ results array<Google\Cloud\Speech\V2\SpeechRecognitionResult>

Sequential list of transcription results corresponding to sequential portions of audio.

↳ metadata Google\Cloud\Speech\V2\RecognitionResponseMetadata

Metadata about the recognition.

getResults

Sequential list of transcription results corresponding to sequential portions of audio.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setResults

Sequential list of transcription results corresponding to sequential portions of audio.

Parameter
NameDescription
var array<Google\Cloud\Speech\V2\SpeechRecognitionResult>
Returns
TypeDescription
$this

getMetadata

Metadata about the recognition.

Returns
TypeDescription
Google\Cloud\Speech\V2\RecognitionResponseMetadata|null

hasMetadata

clearMetadata

setMetadata

Metadata about the recognition.

Parameter
NameDescription
var Google\Cloud\Speech\V2\RecognitionResponseMetadata
Returns
TypeDescription
$this