Class ExplicitDecodingConfig (2.25.1)

ExplicitDecodingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Explicitly specified decoding parameters.

Attributes

NameDescription
encoding google.cloud.speech_v2.types.ExplicitDecodingConfig.AudioEncoding
Required. Encoding of the audio data sent for recognition.
sample_rate_hertz int
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). Supported for the following encodings: - LINEAR16: Headerless 16-bit signed little-endian PCM samples. - MULAW: Headerless 8-bit companded mulaw samples. - ALAW: Headerless 8-bit companded alaw samples.
audio_channel_count int
Number of channels present in the audio data sent for recognition. Supported for the following encodings: - LINEAR16: Headerless 16-bit signed little-endian PCM samples. - MULAW: Headerless 8-bit companded mulaw samples. - ALAW: Headerless 8-bit companded alaw samples. The maximum allowed value is 8.

Classes

AudioEncoding

AudioEncoding(value)

Supported audio data encodings.

Values: AUDIO_ENCODING_UNSPECIFIED (0): Default value. This value is unused. LINEAR16 (1): Headerless 16-bit signed little-endian PCM samples. MULAW (2): Headerless 8-bit companded mulaw samples. ALAW (3): Headerless 8-bit companded alaw samples.