FastRTC v0.4 & WebRTC-AI: Open-Source Real-Time Full-Duplex Voice Agents with Sub-200ms Latency
As proprietary real-time voice APIs impose high per-minute costs and unpredictable network jitter, FastRTC v0.4 and the WebRTC-AI framework establish an open-source standard for ultra-low-latency, full-duplex conversational voice agents operating with sub-200ms glass-to-glass latency.

The Evolution from Half-Duplex Cascades to Native Audio Streaming
For years, conversational voice interfaces relied on a fragmented, three-stage cascade: Automatic Speech Recognition (ASR) transcribed user audio into text; a Large Language Model (LLM) processed the tokens and generated text responses; and Text-to-Speech (TTS) synthesized the resulting words back into an audio waveform. While functional, this cascaded architecture suffered from severe structural latency. Even under optimal cloud conditions, the cumulative lag of chunked speech recognition, token generation, and audio synthesis rarely fell below 1,200 to 1,800 milliseconds.
More critically, cascaded architectures were fundamentally half-duplex. Users had to wait for the synthesizer to finish speaking before replying, and barge-in interruptions required awkward endpointing heuristics that frequently misclassified background noise or momentary breath pauses as conversational turns. The release of FastRTC v0.4, integrated with the WebRTC-AI distributed transport protocol, shatters this latency barrier by providing a fully open-source, full-duplex conversational audio pipeline operating directly over UDP-based WebRTC data and media channels.
By bypassing the HTTP REST request-response cycle entirely, FastRTC enables continuous, bidirectional audio streaming between client browsers and inference servers. A user can interrupt an agent mid-sentence, speak concurrently, or vary their intonation, while the agent dynamically modulates its vocal pacing, pitch, and conversational pauses with the natural responsiveness of a human interlocutor.
Architecture of the FastRTC Audio Pipeline
The core innovation of FastRTC v0.4 resides in its unified audio stream orchestrator, engineered in Rust and C++ with Python bindings. Rather than buffering audio into discrete multi-second chunks, FastRTC operates on continuous 20-millisecond Opus audio frames transmitted over WebRTC SRTP (Secure Real-time Transport Protocol). At the client boundary, the library integrates a high-efficiency Voice Activity Detection (VAD) and Acoustic Echo Cancellation (AEC) preprocessor compiled to WebAssembly.
When an audio frame arrives at the inference edge, it is fed simultaneously into two parallel execution tracks: the Low-Latency Neural Acoustic Embedder and the Incremental Context Router. The acoustic embedder translates raw PCM audio into continuous semantic tokens, bypassing text transcription entirely. These tokens stream directly into an end-to-end multimodal speech model (such as Moshi, Mini-Omni 2, or Llama-3-Omni), which begins generating output audio tokens on the very first forward pass.
The audio synthesis engine leverages streaming continuous vocoders based on flow-matching architectures. By synthesizing audio in overlapping 40ms spectral frames with cross-faded boundary smoothing, the system eliminates phase discontinuity artifacts that traditionally produced audible clicking in chunked audio generators. The resulting vocal timbre captures rich emotional nuance, breath cadences, and subtle prosodic shifts that mirror the conversational pacing of the human speaker.
Latency Benchmark: The Sub-200ms Glass-to-Glass Barrier
Glass-to-glass latency measures the total elapsed duration from the exact millisecond acoustic sound waves hit the client microphone to the millisecond the agent’s synthetic voice vibrates the client speaker. FastRTC v0.4 achieves a median glass-to-glass turnaround of 165 milliseconds over standard fiber-to-the-home broadband.
Barge-In and Interruptibility: Solving the Turn-Taking Dilemma
The primary hallmark of natural human conversation is fluid turn-taking. Humans seamlessly interject, nod with affirmative vocalizations (‘uh-huh’, ‘right’), or yield the floor when interrupted. In synthetic voice systems, achieving this behavior requires sophisticated backchannel detection. Legacy systems utilized hard thresholds: if client audio exceeded a specific decibel level while the agent was speaking, the agent’s playback was abruptly muted. This produced jarring, clipped audio whenever the user coughed, cleared their throat, or background sirens wailed.
FastRTC v0.4 replaces naive decibel thresholding with a neural Barge-In Discriminator. Operating over an ultralight 12-million-parameter transformer running locally on the client WebAssembly thread, the discriminator classifies incoming audio into three distinct categories: background acoustic noise, non-interruptive backchannel agreement, and active competitive conversational turn-taking. If the user murmurs ‘yeah’ while the agent explains a complex concept, the agent continues speaking smoothly; if the user says ‘Wait, pause there’, playback ceases in under 35 milliseconds, and the agent’s context window updates instantaneously.
To ensure graceful conversational recovery after an interruption, FastRTC implements an attention rewind buffer. When a barge-in is confirmed, the server-side inference engine rolls back its generation state to the exact token boundary corresponding to the user’s interruption timestamp, pruning hallucinated or unspoken output tokens from the ongoing dialogue history. This prevents the agent from referencing statements it intended to make but never actually articulated over the audio stream.
| Architecture Component | Legacy Cascaded Pipeline (ASR + LLM + TTS) | FastRTC v0.4 Full-Duplex WebRTC Fabric |
|---|---|---|
| Transport Layer | HTTP/2 WebSockets (TCP head-of-line blocking) | WebRTC SRTP/UDP (Zero head-of-line delay) |
| Glass-to-Glass Latency | 1,400 ms – 2,200 ms (Disjoint stages) | 140 ms – 185 ms (End-to-end streaming) |
| Interruption Handling | Half-duplex / Naive audio clipping | Full-duplex Neural Barge-In Discriminator |
| Emotional / Prosodic Inflection | Flat synthetic prosody from text tokens | Direct acoustic-to-acoustic prosodic mirroring |
| Serving Cost per Hour | $1.80 – $3.60 across multiple hosted APIs | $0.14 self-hosted on single GPU instances |
Network Jitter Buffering and ICE Optimization
Real-world internet connections are fraught with packet loss, mobile cell tower handoffs, and bufferbloat. Because WebRTC operates over UDP, packet loss manifests not as transmission pauses, but as dropped audio frames. FastRTC v0.4 incorporates a specialized NetEQ-AI jitter buffer that utilizes neural packet loss concealment (PLC). When up to 15% of packets are dropped during transient Wi-Fi congestion, a recurrent neural network predicts and synthesizes the missing audio phonemes seamlessly, preventing audible clicks or robotic stuttering.
Furthermore, FastRTC optimizes Interactive Connectivity Establishment (ICE) negotiation. By utilizing trickle ICE and pre-warmed TURN/STUN relays distributed across edge points of presence (PoPs), initial peer connection establishment drops from 1.2 seconds to under 180 milliseconds, allowing voice interactions to initiate virtually instantaneously upon page load.
In mobile environments where cellular radios transition between 5G and LTE towers, FastRTC dynamically adjusts its forward error correction (FEC) redundancy and adapts Opus bitrate between 16 kbps and 64 kbps in real time. This adaptive bandwidth throttle ensures that conversational continuity is preserved even under challenging high-loss mobile conditions without degrading speech comprehension.
Enterprise Applications: Call Centers and Industrial Hands-Free Work
The operational and economic implications of FastRTC v0.4 are monumental for enterprise telecommunications. Modern customer service contact centers spend billions annually on legacy telephony infrastructure and human operator seating. Commercial closed voice APIs charge between $0.06 and $0.15 per minute, making high-volume customer service automation prohibitively expensive. Self-hosting FastRTC on commodity GPU instances (such as NVIDIA L4 or RTX 4090) reduces per-minute voice serving costs to less than $0.002, unlocking massive operational leverage.
Beyond call centers, FastRTC enables hands-free industrial maintenance workflows. Field technicians servicing complex avionics or high-voltage switchgear can maintain a continuous, natural dialogue with an engineering documentation agent without looking away from physical machinery or touching handheld tablets. The sub-200ms latency ensures that emergency troubleshooting procedures can be executed with zero cognitive lag.
Conclusion: The Voice-Native Era Has Arrived
FastRTC v0.4 represents the decisive emancipation of conversational artificial intelligence from the constraints of text. By delivering an open-source, full-duplex WebRTC foundation capable of matching the natural pacing and interruption dynamics of human speech, the project democratizes the next generation of voice-native applications.
As developer adoption sweeps across enterprise contact centers, embedded automotive systems, and ambient smart home devices, the conversational interface of the future will not be typed—it will be spoken, naturally, fluidly, and without delay.