Glossary
Audio Codec
An audio codec encodes and compresses voice for transmission and decodes it on the other end. The codec on a call shapes sound quality and speech recognition.
Updated November 30, 2026
What Is an Audio Codec?
An audio codec (coder-decoder) is an algorithm that turns sound into a compact digital stream for transmission and turns it back into sound at the other end. Every phone call uses one. On a VoIP call, the two sides agree on a codec before any audio flows, and that choice shapes how the call sounds, how much bandwidth it uses, and how well it survives network problems.
For AI voice agents, the codec matters twice. It affects what the caller hears, and it determines how much detail reaches the agent's speech recognition.
How Audio Codecs Work
A codec samples the audio signal, then encodes it. Two choices define most of its behavior:
- Sample rate: How many times per second the sound is measured. Narrowband telephony samples at 8 kHz and carries roughly 300 to 3,400 Hz of speech. Wideband audio samples at 16 kHz and carries much more of the detail that distinguishes sounds such as "f" and "s".
- Compression: How aggressively the data is reduced. Some codecs send nearly raw samples; others model speech to cut bandwidth sharply, at some cost to quality.
On a SIP call, codec negotiation happens in the SDP offer and answer. Each side lists the codecs it supports, and they settle on one they share. If two systems have no codec in common, a media server or session border controller must transcode, which adds processing, delay, and some quality loss.
Common Voice Codecs
- G.711: The classic telephone codec, in μ-law (North America and Japan) and A-law (most other regions) variants. It uses 8 kHz sampling at 64 kbit/s with no complex compression. It is universal on the PSTN and the safe default for interoperability.
- G.722: A wideband codec using 16 kHz sampling at 64 kbit/s. It sounds noticeably clearer than G.711 and is common on IP desk phones.
- G.729: A narrowband codec that compresses voice to 8 kbit/s. It saves bandwidth but loses quality and handles background noise and music poorly.
- Opus: An open, flexible codec standardized in RFC 6716. It scales from narrowband to fullband, adapts its bitrate to network conditions, and resists packet loss well. It is the default in WebRTC.
Mobile networks use their own codecs, such as AMR and its wideband variant. A call can be transcoded several times between a caller's phone and a contact center.
Why Codecs Matter for Voice AI
Speech models are often trained or tuned on clearer audio than the phone network delivers. When audio arrives as 8 kHz G.711, or after several transcodes, the agent hears less:
- Recognition accuracy: Narrowband and heavily compressed audio raise the word error rate, especially on names, letters, and digits.
- Paralinguistic cues: Tone and emphasis are harder to read in reduced audio, which affects speech-to-speech models that work on the sound directly.
- Latency: Transcoding and larger packet sizes add delay to every turn.
- Loss handling: Codecs differ in how they cope with packet loss and jitter. Opus has built-in concealment and forward error correction options; G.711 relies on the receiver.
The practical lesson is to test an AI voice agent on the codecs your real calls use, not only on wideband app audio. Listener ratings such as mean opinion score (MOS) can quantify how a codec sounds; WER shows how it affects understanding.
Audio Codecs in Maven Voice
Maven Voice connects over SIP, PSTN, and WebRTC, so it meets both narrowband phone audio and wideband browser audio. Maven's Voice Arena evaluates models on real calls over the public phone network, where, as its GPT-Live-1 evaluation notes, audio is squeezed to 8 kHz.
Frequently Asked Questions
Which codec is best for AI voice agents?
A wideband codec such as Opus or G.722 gives the agent more speech detail when both ends support it. On calls from the PSTN, the audio is often narrowband before it reaches you, so a wideband codec on your side cannot restore what was lost upstream.
What is transcoding?
Transcoding converts audio from one codec to another, for example from G.711 to Opus. It is needed when two systems share no codec. It costs processing time and can reduce quality, so it is best kept to a minimum.
Does codec choice affect bandwidth costs?
Yes, but less than it used to. G.711 needs about 64 kbit/s plus packet overhead, while compressed codecs need much less. On modern networks, quality and interoperability usually matter more than bandwidth.
Why do callers sound muffled on phone lines?
Narrowband codecs cut off higher frequencies, which carry much of the crispness of speech. The voice remains understandable but loses detail.
See it on your own conversations.
Request a free personalized demo.