By Sagar Shankaran, Founder of CallSphere
Most teams ship Opus at WebRTC defaults. AI voice agents need different defaults — tighter jitter buffers, FEC on, DTX off, and a bitrate that respects STT.
Key takeaways
Opus at WebRTC defaults is tuned for human-to-human chat. AI voice agents have a different listener — a STT model — and a different deadline (sub-200 ms first turn). Tune accordingly.
flowchart TD
Client[Browser] --> Sig[Signaling /ws]
Sig --> Peer[RTCPeerConnection]
Peer --> SRTP[(SRTP audio)]
SRTP --> Edge[Edge node]
Edge --> LLM[Voice LLM]
LLM --> Edge
Edge --> SRTPOpus is the only audio codec WebRTC mandates. It runs from 6 kbps narrowband up to 510 kbps fullband and switches dynamically. The browser pipeline before Opus is: capture → resample to 48 kHz mono → WebRTC APM (AEC, AGC, NS, HPF) → encode.
For AI voice agents in 2026, the defaults that need adjustment are: jitter buffer length (lower), FEC (on), DTX (off for STT), and bitrate (respect downstream model preferences).
The Opus path matters at three stages:
A common mistake: leaving DTX (Discontinuous Transmission) on means silence is replaced by tiny "comfort noise" packets. STT models hate that — they may interpret comfort noise as speech onsets.
CallSphere defaults across all 37 agents:
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
The 6-container pod (CRM writer, calendar, MLS lookup, SMS, audit, transcript) sees PCM after the gateway decodes Opus. NATS carries 16 kHz frames between containers.
```ts const stream = await navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: true, noiseSuppression: true, autoGainControl: false }, }); const track = stream.getAudioTracks()[0];
const transceiver = pc.addTransceiver(track, { direction: "sendonly" });
const sender = transceiver.sender; const params = sender.getParameters(); params.encodings = [{ maxBitrate: 24_000, priority: "high", networkPriority: "high" }]; await sender.setParameters(params);
// Munge SDP to enable FEC and disable DTX pc.createOffer().then(async (offer) => { offer.sdp = offer.sdp! .replace(/useinbandfec=0/g, "useinbandfec=1") .replace(/usedtx=1/g, "usedtx=0"); await pc.setLocalDescription(offer); }); ```
Will lower bitrate hurt STT? Below ~16 kbps, yes. 24 kbps is the sweet spot. Should I disable AEC for AI? No — your TTS audio leaks back into the mic without it. What about ACGC? Auto-gain often fights TTS levels; disable in production. Does `gpt-realtime` use Opus? Yes, both directions, 24 kHz on the WebRTC path. Can I use a different codec? WebRTC mandates Opus for voice — there is no good reason to leave it.
Hear the tuning in action on /demo. Pricing on /pricing.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Opus Codec Tuning for AI Voice Agents: 2026 Production Defaults That Actually Help sounds like a single decision, but in production it splits into eval design, prompt cost, and observability. The deeper you push toward live traffic, the more those three pull against each other — better evals catch silent failures, prompt cost limits how often you can re-run them, and weak observability hides which retries are actually saving conversations versus burning latency budget.
Production AI agents live or die on three loops: evals, retries, and handoff state. CallSphere runs 37 agents across 6 verticals, each with its own eval suite — synthetic call transcripts replayed nightly with assertion checks on extracted entities (date, time, party size, insurance, address). Without that loop, prompt regressions ship silently and you only find out when bookings drop.
Structured tools beat free-form text every time. Our 90+ function tools all enforce JSON schemas validated server-side; if the model hallucinates an integer where a string is required, we retry with a corrective system message before falling back to a deterministic path. For long-running flows, we treat agent handoffs as a state machine — booking → confirmation → SMS — so context survives turn boundaries.
The Realtime API vs. async decision usually comes down to "is the user holding the phone right now?" If yes, Realtime; if no (callback queue, after-hours voicemail), async wins on cost-per-conversation, which we track per agent in 115+ database tables spanning all 6 verticals.
How does this apply to a CallSphere pilot specifically? CallSphere runs 37 production agents and 90+ function tools across 115+ database tables in 6 verticals, so most workflows you'd want already have a template. For a topic like "Opus Codec Tuning for AI Voice Agents: 2026 Production Defaults That Actually Help", that means you're not starting from scratch — you're configuring an agent template that's already been hardened across thousands of conversations.
What does the typical first-week implementation look like? Day one is integration mapping (scheduler, CRM, messaging) and prompt tuning against your top 20 real call transcripts. Day two through five is shadow-mode running, where the agent transcribes and recommends but a human still answers, so you can compare side-by-side. Go-live is the moment your eval pass-rate clears your internal bar.
Where does this break down at scale? The honest answer: it scales until your tool catalog gets stale. The agent is only as good as the integrations it can actually call, so the operational discipline is keeping schemas, webhooks, and fallback paths green. The platform handles the rest — observability, retries, multi-region routing — without your team owning the GPU layer.
Want to see how this maps to your stack? Book a live walkthrough at calendly.com/sagar-callsphere/new-meeting, or try the vertical-specific demo at healthcare.callsphere.tech. 14-day trial, no credit card, pilot live in 3–5 business days.
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
A founder's guide to texto a voz (text-to-speech in Spanish): LATAM vs Castilian voices, free options, and how CallSphere ships Spanish agents.
A founder's guide to the female voice generator landscape: AI female voices, Japanese voices, robot voices, and how CallSphere ships 57+ voices live.
A founder's guide to the Siri voice generator landscape: how AI voice cloning works, what is legal, and how CallSphere uses 57+ voices in production.
A founder's guide to AI voice assistants for ecommerce: customer service, order lookup, and how CallSphere fits in versus virtual receptionists.
Robot text to speech in 2026: how I pick TTS APIs, when robotic voices help, and how CallSphere ships 57+ language voice agents. Hands-on guide.
The customer support specialist role in 2026 is half human, half AI. Here is what the job looks like, the AI tools that pair with it, and how we ship it.
© 2026 CallSphere LLC. All rights reserved.
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.