<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/speech/v1beta1/cloud_speech.proto

namespace Google\Cloud\Speech\V1beta1;

/**
 * Audio encoding of the data sent in the audio message. All encodings support
 * only 1 channel (mono) audio. Only `FLAC` includes a header that describes
 * the bytes of audio that follow the header. The other encodings are raw
 * audio bytes with no header.
 * For best results, the audio source should be captured and transmitted using
 * a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be
 * reduced if lossy codecs (such as AMR, AMR_WB and MULAW) are used to capture
 * or transmit the audio, particularly if background noise is present.
 *
 * Protobuf enum <code>Google\Cloud\Speech\V1beta1\RecognitionConfig\AudioEncoding</code>
 */
class RecognitionConfig_AudioEncoding
{
    /**
     * Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
     *
     * Generated from protobuf enum <code>ENCODING_UNSPECIFIED = 0;</code>
     */
    const ENCODING_UNSPECIFIED = 0;
    /**
     * Uncompressed 16-bit signed little-endian samples (Linear PCM).
     * This is the only encoding that may be used by `AsyncRecognize`.
     *
     * Generated from protobuf enum <code>LINEAR16 = 1;</code>
     */
    const LINEAR16 = 1;
    /**
     * This is the recommended encoding for `SyncRecognize` and
     * `StreamingRecognize` because it uses lossless compression; therefore
     * recognition accuracy is not compromised by a lossy codec.
     * The stream FLAC (Free Lossless Audio Codec) encoding is specified at:
     * http://flac.sourceforge.net/documentation.html.
     * 16-bit and 24-bit samples are supported.
     * Not all fields in STREAMINFO are supported.
     *
     * Generated from protobuf enum <code>FLAC = 2;</code>
     */
    const FLAC = 2;
    /**
     * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
     *
     * Generated from protobuf enum <code>MULAW = 3;</code>
     */
    const MULAW = 3;
    /**
     * Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.
     *
     * Generated from protobuf enum <code>AMR = 4;</code>
     */
    const AMR = 4;
    /**
     * Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz.
     *
     * Generated from protobuf enum <code>AMR_WB = 5;</code>
     */
    const AMR_WB = 5;
}

