Cloud Speech V1 Client - Class RecognizeResponse (1.15.0)

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

The only message returned to the client by the Recognize method. It contains the result as zero or more sequential SpeechRecognitionResult messages.

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

Namespace

Google \ Cloud \ Speech \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

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

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

↳ total_billed_time Google\Protobuf\Duration

When available, billed audio seconds for the corresponding request.

↳ speech_adaptation_info Google\Cloud\Speech\V1\SpeechAdaptationInfo

Provides information on adaptation behavior in response

↳ request_id int|string

The ID associated with the request. This is a unique ID specific only to the given request.

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\V1\SpeechRecognitionResult>
Returns
TypeDescription
$this

getTotalBilledTime

When available, billed audio seconds for the corresponding request.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasTotalBilledTime

clearTotalBilledTime

setTotalBilledTime

When available, billed audio seconds for the corresponding request.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getSpeechAdaptationInfo

Provides information on adaptation behavior in response

Returns
TypeDescription
Google\Cloud\Speech\V1\SpeechAdaptationInfo|null

hasSpeechAdaptationInfo

clearSpeechAdaptationInfo

setSpeechAdaptationInfo

Provides information on adaptation behavior in response

Parameter
NameDescription
var Google\Cloud\Speech\V1\SpeechAdaptationInfo
Returns
TypeDescription
$this

getRequestId

The ID associated with the request. This is a unique ID specific only to the given request.

Returns
TypeDescription
int|string

setRequestId

The ID associated with the request. This is a unique ID specific only to the given request.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this