Encoding
Encoding allows you to specify the expected encoding of your submitted audio.
encoding
string.
Encoding is required when raw, headerless audio packets are sent to the streaming service. If containerized audio packets are sent to the streaming service, this feature should not be used.
If using the Encoding feature, the Sample Rate feature is also required.
Enable Feature
To enable Encoding, when you call Deepgram’s API, add an encoding
parameter in the query string and set it to the audio coding algorithm of your submitted audio:
encoding=OPTION
Deepgram supports the following audio coding algorithms:
linear16
: 16-bit, little endian, signed PCM WAV dataflac
: Free Lossless Audio Codec (FLAC) encoded datamulaw
: Mu-law encoded WAV dataamr-nb
: Adaptive Multi-Rate (AMR) narrowband codecamr-wb
: Adaptive Multi-Rate (AMR) wideband codecopus
: Ogg Opusspeex
: Speex
For an example of audio streaming, see Getting Started with Streaming Audio.
For help determining your audio format and sample rate, see Determining Your Audio Format for Live Streaming Audio.
Use Cases
Some examples of use cases for Encoding include:
- Customers who need to stream raw audio data. Not sure if you need to stream raw audio data? Check out Determining Your Audio Format for Live Streaming Audio.
Updated 8 days ago