Independent OpenClaw reporting, releases, guides, and community coverage
OpenClaw News

OpenClaw Fixes Realtime Voice Audio Gaps

OpenClaw's realtime voice calls should sound smoother after a merged fix for pacing, resampling, telephony TTS, and playback marks.

Filed under Posts 3 min read Updated Aug 18, 2026
OpenClaw Fixes Realtime Voice Audio Gaps

OpenClaw merged a high-priority realtime voice repair in PR #125620, targeting calls that could sound choppy, gapped, or corrupted even when the upstream synthesis stream was continuous.

The pull request says the production symptom was observed on August 17 and 18, 2026. Review traced it to five separate mechanisms: outbound pacing, chunk-by-chunk resampling, telephony TTS format handling, Twilio playback completion, and bounded audio buffering.

For anyone using OpenClaw as a phone or voice-call agent, this is a practical quality-of-service fix rather than a cosmetic change. Voice feels broken quickly when timing drifts, chunks arrive late, or the system misreads raw telephony audio as a containerized format.

What Changed

The merged change gives OpenClaw's voice pipeline a more continuous model of audio streams. Instead of chaining relative 20 ms timers for each outbound frame, the realtime audio pacer now uses an absolute monotonic stream clock with a 160 ms lead window and catch-up behavior for overdue frames.

The audio codec path also gained a streaming PCM resampler. That matters because resampling each chunk independently can introduce discontinuities at boundaries. The PR says the new helper preserves sinc filter history and fractional phase across chunks, then wires that behavior into WebRTC and telephony paths.

Telephony TTS format handling is another major part of the repair. Azure raw 8 kHz mu-law and Gradium ulaw_8000 are now passed through according to their format contracts, PCM is converted, and container formats are rejected with a typed error instead of being double-companded into unusable audio.

Why Twilio Needed Special Handling

The PR makes an important distinction between WebRTC and Twilio Media Streams. Codex OSS uses WebRTC for realtime calls, where RTP transport owns media pacing. Twilio exposes audio over WebSocket, so OpenClaw has to pace those frames in userspace.

That puts more responsibility on the Gateway. It needs to keep frames moving at the right cadence, detect interruptions, avoid stale queued audio, and know when playback actually completed.

PR #125620 updates Twilio playback to wait for echoed completion marks, fall back after the audio duration plus two seconds, ignore stale marks after a clear, race barge-in against in-flight synthesis, and abort cleanly when a partial send fails.

User Impact

The expected result is simple: realtime and streaming voice calls should sound smoother. The merged PR specifically calls out fewer timer-lateness gaps, cleaner resampling behavior, correct telephony TTS pass-through, deterministic barge-in, deterministic playback completion, and bounded backpressure handling.

No configuration change is required. Operators should benefit from the fix when they update to a build containing the merged PR.

This is also a useful reminder of how much work "voice agent" really means. OpenClaw is not only passing text to a model. It is managing transport clocks, codec contracts, provider-specific stream behavior, and interruption semantics in real time.

Evidence From The PR

The PR reports 180-plus focused tests across 12 files, including fake-timer pacing regressions, DSP-equivalence tests, format-contract coverage, playback-mark behavior, abort handling, backpressure, and overflow cases. It also reports pnpm build, pnpm plugin-sdk:surface:check, pnpm check:changed, and a clean Codex autoreview.

The author notes that live-call listening proof was infeasible from the development checkout because Twilio credentials and tailnet access live on the operator's production Gateway. Instead, the evidence focuses on deterministic tests for the mechanisms that caused the audio problems.

Daily Briefing

Get the Open-Source Briefing

The stories that matter, delivered to your inbox every morning. Free, no spam, unsubscribe anytime.

Join 45,000+ developers. No spam. Unsubscribe anytime.