Cloud Speech V2 Client - Class ExplicitDecodingConfig (2.0.0)

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

Explicitly specified decoding parameters.

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

Namespace

Google \ Cloud \ Speech \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ encodingint

Required. Encoding of the audio data sent for recognition.

↳ sample_rate_hertzint

Optional. Sample rate in Hertz of the audio data sent for recognition. Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.

↳ audio_channel_countint

Optional. Number of channels present in the audio data sent for recognition. Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED. The maximum allowed value is 8.

getEncoding

Required. Encoding of the audio data sent for recognition.

Returns
TypeDescription
int

setEncoding

Required. Encoding of the audio data sent for recognition.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getSampleRateHertz

Optional. Sample rate in Hertz of the audio data sent for recognition.

Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.

Returns
TypeDescription
int

setSampleRateHertz

Optional. Sample rate in Hertz of the audio data sent for recognition.

Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getAudioChannelCount

Optional. Number of channels present in the audio data sent for recognition. Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.

The maximum allowed value is 8.

Returns
TypeDescription
int

setAudioChannelCount

Optional. Number of channels present in the audio data sent for recognition. Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.

The maximum allowed value is 8.

Parameter
NameDescription
varint
Returns
TypeDescription
$this