AudioFormat
Audio container/codec formats supported by the SDK.
type AudioFormat = "pcm" | "opus" | "mp3" | "wav" | "webm";
Defined in: src/core/types/audio.ts:31
Audio container/codec formats supported by the SDK.
Remarks
Represents the container or codec format for audio data flowing through the pipeline. The format you choose depends on your STT and TTS providers. For example, Deepgram WebSocket STT expects 'pcm' (raw linear16), while REST-based TTS providers may return 'mp3' or 'opus' encoded audio.
'pcm'- Raw PCM (uncompressed, lowest latency, highest bandwidth)'opus'- Opus codec (good compression, low latency, widely supported)'mp3'- MP3 format (universal compatibility, higher latency)'wav'- WAV container (uncompressed PCM with headers)'webm'- WebM container (browser-native, used by MediaRecorder)
See
- AudioInputConfig for configuring the capture format
- AudioEncoding for the related encoding type