Class: Google::Cloud::Speech::V2::ExplicitDecodingConfig
- Inherits:
-
Object
- Object
- Google::Cloud::Speech::V2::ExplicitDecodingConfig
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/speech/v2/cloud_speech.rb
Overview
Explicitly specified decoding parameters.
Defined Under Namespace
Modules: AudioEncoding
Instance Attribute Summary collapse
-
#audio_channel_count ⇒ ::Integer
Number of channels present in the audio data sent for recognition.
-
#encoding ⇒ ::Google::Cloud::Speech::V2::ExplicitDecodingConfig::AudioEncoding
Required.
-
#sample_rate_hertz ⇒ ::Integer
Sample rate in Hertz of the audio data sent for recognition.
Instance Attribute Details
#audio_channel_count ⇒ ::Integer
Returns 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.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 450 class ExplicitDecodingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Supported audio data encodings. module AudioEncoding # Default value. This value is unused. AUDIO_ENCODING_UNSPECIFIED = 0 # Headerless 16-bit signed little-endian PCM samples. LINEAR16 = 1 # Headerless 8-bit companded mulaw samples. MULAW = 2 # Headerless 8-bit companded alaw samples. ALAW = 3 end end |
#encoding ⇒ ::Google::Cloud::Speech::V2::ExplicitDecodingConfig::AudioEncoding
Returns Required. Encoding of the audio data sent for recognition.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 450 class ExplicitDecodingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Supported audio data encodings. module AudioEncoding # Default value. This value is unused. AUDIO_ENCODING_UNSPECIFIED = 0 # Headerless 16-bit signed little-endian PCM samples. LINEAR16 = 1 # Headerless 8-bit companded mulaw samples. MULAW = 2 # Headerless 8-bit companded alaw samples. ALAW = 3 end end |
#sample_rate_hertz ⇒ ::Integer
Returns 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.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 450 class ExplicitDecodingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Supported audio data encodings. module AudioEncoding # Default value. This value is unused. AUDIO_ENCODING_UNSPECIFIED = 0 # Headerless 16-bit signed little-endian PCM samples. LINEAR16 = 1 # Headerless 8-bit companded mulaw samples. MULAW = 2 # Headerless 8-bit companded alaw samples. ALAW = 3 end end |