Sample Rate

Sample Rate allows you to specify the sample rate of your submitted audio. Required when the Encoding feature is also being used to submit streaming raw audio. It is not read at any other time.

sample_rate int32

Enable Feature

To enable Sample Rate, when you call Deepgram’s API, add a sample_rate parameter in the query string and set it to the sample rate of your submitted audio.

sample_rate=SAMPLE_RATE_VALUE

⚠️

When submitting audio encoded with the Adaptive Multi-Rate (AMR) codec, you must submit specific Sample Rate values:

  • amr-nb: AMR narrowband codec. When using this option, you must specify sample_rate=8000 (encoding=amr-nb&sample_rate=8000).
  • amr-wb: AMR wideband codec. When using this option, you must also specify sample_rate=16000 (encoding=amr-wb&sample_rate=16000).