Cloud Speech V2 Client - Class RecognitionConfig (1.7.0)

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
NameDescription
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.

Generated from protobuf field .google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;

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

hasAutoDecodingConfig

setAutoDecodingConfig

Automatically detect decoding parameters.

Preferred for supported formats.

Generated from protobuf field .google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;

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

getExplicitDecodingConfig

Explicitly specified decoding parameters.

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

Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;

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

hasExplicitDecodingConfig

setExplicitDecodingConfig

Explicitly specified decoding parameters.

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

Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;

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

getFeatures

Speech recognition features to enable.

Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures features = 2;

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

hasFeatures

clearFeatures

setFeatures

Speech recognition features to enable.

Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures features = 2;

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

getAdaptation

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

Generated from protobuf field .google.cloud.speech.v2.SpeechAdaptation adaptation = 6;

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

hasAdaptation

clearAdaptation

setAdaptation

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

Generated from protobuf field .google.cloud.speech.v2.SpeechAdaptation adaptation = 6;

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

getDecodingConfig

Returns
TypeDescription
string