input_format query parameter. Audio is sent as binary WebSocket frames — chunked bytes, no base64, no JSON wrapping.
Container formats (mp3, webm, etc.) are self-describing: the server demuxes the byte stream and extracts encoding/sample rate from headers. Raw formats have no metadata, so you must set sample_rate explicitly.
Works for both real-time capture (microphone, MediaRecorder, telephony bridge) and file streaming (read a file in chunks, push through the socket).
Browser Capture
Output fromMediaRecorder or similar browser APIs. Container headers carry sample rate.
Telephony
Codecs from voice networks. Raw frames,sample_rate required.
Invalid sample rate returns error 40005.
Raw PCM
Uncompressed audio from microphones, processing pipelines, or SDKs.sample_rate required.
Invalid sample rate returns error 40005.
Recorded File
Pre-recorded files read in chunks and streamed through the socket. Container headers carry sample rate.Engine Compatibility
Unsupported format/engine combination returns error 40002. Unsupported Flux format returns error 40006. Deepgram has three model generations with different format support. Flux is the most restrictive of Deepgram’s models — it dropsmp3, flac, webm_opus, amr_nb, amr_wb, g729, and speex compared to Nova.
Reson8 accepts raw formats only (
linear16, linear32, mulaw, alaw) at any sample rate — container formats are not supported.
Universal formats (all engines and models): linear16.