Audio codecs
In one sentence
An audio codec is the scheme that squeezes sound into a form a network can carry, and whichever one a voice system runs on settles how the audio sounds, what it costs in bandwidth, and how much of it a recognizer can actually transcribe.
Definition
A codec is how sound gets packaged for a journey across a network. Whichever one is in play settles how the audio sounds, what it costs in bandwidth, and how much of it a recognizer can make out.
Three of them cover nearly all voice agent work: PCM inside the models, Opus over the browser, G.711 on the phone network.
PCM, pulse-code modulation
- Raw linear digital audio with nothing squeezed out of it. Calling it a compression codec is wrong, and that is exactly what makes it useful.
- Speech AI work usually runs it at 16-bit samples, either 16 kHz or 24 kHz.
- It is the format everything ends up in, because recognition and synthesis models read raw samples. Whatever arrives compressed gets unpacked into PCM before a model ever sees it.
- Best quality, biggest footprint. Sensible inside a data center, extravagant across a network.
Opus
- Open, modern and royalty-free, written up in IETF RFC 6716.
- Covers roughly 6 to 510 kbps and stretches from narrowband sampling all the way to 48 kHz fullband, shifting as the connection does.
- WebRTC makes it mandatory to implement, so it is what a browser reaches for by default.
- Ships with packet loss concealment and forward error correction tuned for live speech, which is why a rough connection makes it fray rather than stall.
- For anything running in a browser it is the correct starting point.
G.711 mu-law and A-law
- An ITU-T recommendation and the phone network standard: 8 kHz sampling, 64 kbps, logarithmic companding.
- North America and Japan run mu-law; nearly everywhere else runs A-law. Same job, different curve.
- Prehistoric by software standards, supported by absolutely everything, and impossible to avoid in telephony.
- It is narrowband, so information goes missing, and the missing information turns up as recognition errors.
The practical implications
- Every hop between codecs takes a bite out of the audio and never gives it back. Opus to G.711 to PCM ends up worse than Opus to PCM, however identical the two endpoints look.
- Sample rate mismatches break things constantly. Hand 8 kHz audio to a model waiting for 16 kHz and you get an error, or something worse: convincing nonsense.
- One session barely touches bandwidth. It only becomes a line on the bill once sessions start stacking up.
Common misconception
That this is plumbing with no bearing on the product. The codec sets the accuracy ceiling. Once a narrowband path has stripped the signal, no upgrade to the model gets it back, because what the model needed left the building first.
Why it matters commercially
Codec and sample rate govern the quality of what goes in, and what goes in governs what comes out. A browser agent gets a structural head start here: wideband Opus gives a recognizer far more raw material than G.711 narrowband is capable of delivering.
In voice specifically
A typed message reaches the server byte for byte no matter what it crossed. Audio gets no such guarantee. Somewhere between the visitor and the model, a codec has already made a lossy decision about their question, and a text conversation has no equivalent moment.
Where AsqVox fits
The Orb works on browser audio over Opus at wideband sampling, which puts it at the good end of the quality range rather than the compromised one.
Visual
Three codecs, three jobs
You cannot model your way back to audio that was never transmitted.
Statistics
Every figure carries its source and year. Vendor numbers are labelled as vendor numbers, and where no reliable figure exists this page says so rather than borrowing one.
RFC 6716 defines Opus. It spans roughly 6 to 510 kbps, reaches 48 kHz fullband sampling, and carries no royalties.
6 to 510 kbps, up to 48 kHzindustry rangeIETF RFC 6716, 2026 - A specification, not a benchmark. What earns it a row is the reach: one codec runs from narrowband to fullband and shifts between them without renegotiating anything.
WebRTC requires Opus as mandatory to implement, with G.711 alongside it so legacy endpoints still interoperate.
Mandatory to implementindustry rangeWebRTC mandatory-to-implement audio codec requirement, 2026 - It is the reason a browser hands you wideband without anybody configuring anything. G.711 comes along so a WebRTC endpoint can still reach the phone network.
G.711 is an ITU-T standard running 8 kHz sampling at 64 kbps with logarithmic companding, mu-law in North America and Japan, A-law nearly everywhere else.
8 kHz, 64 kbpsindustry rangeITU-T G.711, 2026 - The two curves do the same job by different arithmetic. Neither reaches wideband, so picking one over the other buys exactly nothing in accuracy.
PCM is raw linear audio, and speech AI work commonly runs it at 16-bit with either 16 kHz or 24 kHz sampling.
16-bit at 16 or 24 kHzindustry rangeCommon speech AI working format, 2026 - A convention among engineers rather than a ratified standard. It carries weight anyway, because every compressed format has to be unpacked into this before a model reads a sample.
Whisper Large-v3 sits near 2.7 percent word error rate on clean benchmark material against roughly 8 to 12 percent on real-world English. Codec and bandwidth are two of the things opening that gap.
2.7% clean, 8 to 12% real worldindependentWhisper Large-v3 published benchmark, against reported real-world English performance, 2026 - Several variables are tangled together here and the codec is only one. Cite the distance between the two figures as proof that benchmark conditions flatter a recognizer, never as the price of any particular codec.
Nothing public isolates word error rate by codec across identical audio and identical models. Which way the effect runs is not in doubt.
-no reliable figureNever publish a percentage for it, and refuse one when offered. The direction is safe to assert. The size of it has not been measured anywhere you could cite.
Examples
In practice
An agent sails through browser testing and falls apart on a telephony integration. Walking the media path finds the answer: audio turns up as G.711 at 8 kHz, then gets upsampled to 16 kHz so the model receives the shape it expects. Upsampling invents waveform without inventing information, so the recognizer performs like something listening to narrowband, which is precisely what it is. Fix it with domain vocabulary boosting and explicit number confirmation, not with a new model.
The everyday version
Think of a codec as the box sound travels in. The phone network has always used a very old and very small box, which is why phone calls sound the way they do. A browser uses a far bigger one. Give the same software the bigger box and it follows people better.
Usage
Who says it
- Audio and real-time engineers say it constantly and mean something exact by it.
- Telephony integrators say it around transcoding and interoperability questions.
- Buyers rarely say it, and they do not need to. Their version of this conversation is audio quality and how often the system gets words right.
Where it turns up
- Beside supported codecs, sample rates, transcoding behavior, bandwidth per session and packet loss handling.
- Inside telephony interconnect talks, where support for a given codec is a compatibility gate rather than a preference.
Common misuse
- Reading upsampling as repair. Going from 8 kHz to 16 kHz puts nothing back that was thrown away.
- Chasing an accuracy problem without counting the transcoding hops. Media paths run longer than anyone expects.
- Reading codec support as quality parity. Supporting G.711 means you can talk to the phone network, not that you sound like Opus.
Questions people ask
What audio codec should a voice agent use?
In a browser, Opus. RFC 6716 defines it, WebRTC requires it, it stretches from roughly 6 to 510 kbps and up to 48 kHz fullband sampling, and it ships with packet loss concealment and forward error correction built for live speech. Put the same agent on a phone line and G.711 is what you get, wanted or not.
What is the difference between Opus, PCM and G.711?
PCM is raw linear audio, usually 16-bit at 16 or 24 kHz, and it is what a model actually reads. Opus is the compressed format browsers and WebRTC send over the wire. G.711 is the ITU-T telephony standard at 8 kHz and 64 kbps. Whatever arrives compressed gets unpacked into PCM before a model sees a sample of it.
Does the audio codec affect speech recognition accuracy?
It sets the ceiling. A narrowband path throws frequencies away upstream of the model, so upgrading the model recovers nothing. Nothing public isolates word error rate by codec across identical audio and identical models, so state which way the effect runs and refuse to attach a percentage to it.
What is the difference between mu-law and A-law?
They are the two G.711 companding curves. North America and Japan use mu-law, most of the rest of the world uses A-law. Same job, different arithmetic, and both at 8 kHz sampling and 64 kbps. Neither reaches wideband, so choosing between them buys nothing in accuracy.
Last reviewed 30 July 2026. Written and reviewed by Dhruv Dholakia, founder of AsqVox.