Audio Formats
Choosing the Right Format
Pick the output format that matches your delivery channel, latency budget, and quality needs.
Decision Guide
| USE CASE | FORMAT | NOTES |
|---|---|---|
| Real-time voice agent | pcm | Lowest latency, no decoding overhead |
| Twilio / Indian PSTN | mulaw | G.711 mu-law expected by carrier |
| European PSTN | alaw | G.711 A-law standard in Europe |
| Web application | mp3 / ogg_opus | Broad browser support, good compression |
| Post-production / editing | wav / flac | Lossless quality for downstream processing |
| Archival storage | flac | Lossless with ~50% compression |
| Push notifications | mp3 | Small file size; pair with trim_silence |
Tips
- When in doubt, start with
mp3-- it works everywhere and is the default. - For telephony, always pair with
trim_silence=Trueto remove dead air before the callee hears audio. - Use
pcmonly when your pipeline can consume raw samples directly (e.g., WebRTC or custom voice agents).