Class: Google::Cloud::Speech::V2::ExplicitDecodingConfig

Inherits:
Object
  • Object
show all
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

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.

Returns:

  • (::Integer)

    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.


411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 411

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.

Returns:



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 411

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.

Returns:

  • (::Integer)

    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.


411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 411

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