Cloud Speech V2 Client - Class RecognitionConfig (1.11.2)

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

Provides information to the Recognizer that specifies how to process the recognition request.

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

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ auto_decoding_config
Google\Cloud\Speech\V2\AutoDetectDecodingConfig

Automatically detect decoding parameters. Preferred for supported formats.

↳ explicit_decoding_config
Google\Cloud\Speech\V2\ExplicitDecodingConfig

Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).

↳ features
Google\Cloud\Speech\V2\RecognitionFeatures

Speech recognition features to enable.

↳ adaptation
Google\Cloud\Speech\V2\SpeechAdaptation

Speech adaptation context that weights recognizer predictions for specific words and phrases.

getAutoDecodingConfig

Automatically detect decoding parameters.

Preferred for supported formats.

Returns
Type
Description

hasAutoDecodingConfig

setAutoDecodingConfig

Automatically detect decoding parameters.

Preferred for supported formats.

Parameter
Name
Description
Returns
Type
Description
$this

getExplicitDecodingConfig

Explicitly specified decoding parameters.

Required if using headerless PCM audio (linear16, mulaw, alaw).

Returns
Type
Description

hasExplicitDecodingConfig

setExplicitDecodingConfig

Explicitly specified decoding parameters.

Required if using headerless PCM audio (linear16, mulaw, alaw).

Parameter
Name
Description
Returns
Type
Description
$this

getFeatures

Speech recognition features to enable.

Returns
Type
Description

hasFeatures

clearFeatures

setFeatures

Speech recognition features to enable.

Parameter
Name
Description
Returns
Type
Description
$this

getAdaptation

Speech adaptation context that weights recognizer predictions for specific words and phrases.

Returns
Type
Description

hasAdaptation

clearAdaptation

setAdaptation

Speech adaptation context that weights recognizer predictions for specific words and phrases.

Parameter
Name
Description
Returns
Type
Description
$this

getDecodingConfig

Returns
Type
Description
string