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 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:

  • (::Integer)

    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.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 449

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

    # AMR frames with an rfc4867.5 header.
    AMR = 4

    # AMR-WB frames with an rfc4867.5 header.
    AMR_WB = 5

    # FLAC frames in the "native FLAC" container format.
    FLAC = 6

    # MPEG audio frames with optional (ignored) ID3 metadata.
    MP3 = 7

    # Opus audio frames in an Ogg container.
    OGG_OPUS = 8

    # Opus audio frames in a WebM container.
    WEBM_OPUS = 9

    # AAC audio frames in an MP4 container.
    MP4_AAC = 10

    # AAC audio frames in an M4A container.
    M4A_AAC = 11

    # AAC audio frames in an MOV container.
    MOV_AAC = 12
  end
end

#encoding::Google::Cloud::Speech::V2::ExplicitDecodingConfig::AudioEncoding

Returns Required. Encoding of the audio data sent for recognition.

Returns:



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 449

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

    # AMR frames with an rfc4867.5 header.
    AMR = 4

    # AMR-WB frames with an rfc4867.5 header.
    AMR_WB = 5

    # FLAC frames in the "native FLAC" container format.
    FLAC = 6

    # MPEG audio frames with optional (ignored) ID3 metadata.
    MP3 = 7

    # Opus audio frames in an Ogg container.
    OGG_OPUS = 8

    # Opus audio frames in a WebM container.
    WEBM_OPUS = 9

    # AAC audio frames in an MP4 container.
    MP4_AAC = 10

    # AAC audio frames in an M4A container.
    M4A_AAC = 11

    # AAC audio frames in an MOV container.
    MOV_AAC = 12
  end
end

#sample_rate_hertz::Integer

Returns Optional. Sample rate in Hertz of the audio data sent for recognition. Valid values are: 8000-48000, and 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 resampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.

Returns:

  • (::Integer)

    Optional. Sample rate in Hertz of the audio data sent for recognition. Valid values are: 8000-48000, and 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 resampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 449

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

    # AMR frames with an rfc4867.5 header.
    AMR = 4

    # AMR-WB frames with an rfc4867.5 header.
    AMR_WB = 5

    # FLAC frames in the "native FLAC" container format.
    FLAC = 6

    # MPEG audio frames with optional (ignored) ID3 metadata.
    MP3 = 7

    # Opus audio frames in an Ogg container.
    OGG_OPUS = 8

    # Opus audio frames in a WebM container.
    WEBM_OPUS = 9

    # AAC audio frames in an MP4 container.
    MP4_AAC = 10

    # AAC audio frames in an M4A container.
    M4A_AAC = 11

    # AAC audio frames in an MOV container.
    MOV_AAC = 12
  end
end