1. Documentation
  2. Features
  3. Encoding



Deepgram’s Encoding feature allows you to you to specify the expected encoding of your submitted audio. This feature is only required when raw, headerless audio packets are sent to the streaming service.

Use Cases

Some examples of use cases for Encoding include:

  • Customers who need to stream raw audio data.

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:


Deepgram supports the following audio coding algorithms:

  • linear16: 16-bit, little endian, signed PCM WAV data
  • flac: FLAC-encoded data
  • mulaw: mu-law encoded WAV data
  • amr-nb: Adaptive Multi-rate (AMR) narrowband codec. When using this option, you must also specify sample_rate=8000 (encoding=amr-nb&sample_rate=8000).
  • amr-wb: Adaptive Multi-rate (AMR) wideband codec. When using this option, you must also specify sample_rate=16000 (encoding=amr-wb&sample_rate=16000).
  • opus: Ogg Opus
  • speex: Speex

For an example of audio streaming, see Getting Started with Streaming Audio.