Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

OpenAI 12 min read Case study mediumAdept

How we built a realtime system for responsive voice AI in six months

GPT-Live replaces turn-detector-based voice AI with a full-duplex voice model that listens and speaks simultaneously, delegating deeper reasoning and tool use to frontier models like GPT-5.5 over an asynchronous RPC path that never blocks media. The system separates a Go-based media fast path (replacing Python asyncio, with new p95 matching old p50) from application logic. It uses warm model-instance handoffs to perform context compaction without KV-cache rebuild pauses, prefills frontier-model sessions at call start, and derives discrete turns from overlapping speech via speculative and authoritative transcript views. Startup is cut to a single UDP packet through WARP, a set of backward-compatible WebRTC changes that reduces handshakes from six round trips to one, plus Instant Connect for pre-negotiated SDP. Shadow testing on production traffic showed that capacity depends on concurrent sessions and CPU-side stream handling, not just GPU throughput.

Related posts

  • How OpenAI delivers low-latency voice AI at scale

    OpenAI hardMaster

    OpenAI rearchitected its WebRTC stack for ChatGPT voice and the Realtime API by splitting a stateless UDP relay from a stateful Go/Pion transceiver that owns ICE, DTLS and SRTP state. The design avoids one-public-port-per-session media termination, which fits poorly with Kubernetes and cloud load balancers. Server-generated ICE ufrags encode routing hints, so the relay can steer the first STUN packet to the owning transceiver without an external lookup. Relay flows are kept in memory with Redis as a backup, and Cloudflare geo-steered signaling plus a globally distributed relay fleet shorten the first hop and cut setup latency.

  • FastRTC: The Real-Time Communication Library for Python

    Hugging Face mediumAdept

    FastRTC is a Python library for building real-time audio and video AI applications over WebRTC or WebSockets without needing WebRTC expertise. A `Stream` wrapped around a `ReplyOnPause` handler provides built-in voice activity detection and turn taking, auto-generates a Gradio test UI, and can be mounted onto any FastAPI app for production. Bundled speech-to-text (Moonshine) and text-to-speech (Kokoro) models, optimized for CPU inference, let a few lines of code chain STT, an LLM and TTS into a voice chat. `fastphone()` exposes the stream through a free phone number with a Hugging Face token.

  • How Together AI built the world’s fastest speech-to-text stack

    Together AI hardMaster

    Speech-to-text serving is a full-path systems problem, because ASR models are small while audio inputs are large and need heavy CPU preprocessing. Together optimized Parakeet-TDT 0.6B v3 and Whisper Large v3 at each layer of that path. Multi-profile TensorRT engines tune the encoder for real audio shapes instead of padding short chunks. Conditional CUDA graph nodes move the decoder's BLANK-token branch onto the GPU, making the decoder 2-3x faster. Persistent Unix domain sockets, shared memory and fewer process hops cut copy overhead, epoll replaces thread-per-connection streaming to tame GIL contention, and gc.freeze() after startup preallocation removed periodic ~200 ms p95 spikes caused by full Python GC passes.

  • One-second voice-to-voice latency with Modal, Pipecat, and open models

    Modal mediumAdept

    A conversational voice bot on Modal reaches roughly one-second voice-to-voice latency. It uses Pipecat to orchestrate an STT → RAG → LLM → TTS pipeline with Parakeet-tdt-v3, Qwen3-4B-Instruct on vLLM, Kokoro TTS, and ChromaDB with all-MiniLM-L6-v2 retrieval. The main latency levers are running the stateful Pipecat bot on CPU while GPU services autoscale independently, using Pipecat's local VAD and SmartTurn to segment audio instead of streaming STT, and tuning vLLM for time-to-first-token. On the network side, the bot talks to services over WebSockets through Modal Tunnels that bypass the input plane, with a spawned FunctionCall session restoring autoscaling, and services are pinned to clustered regions near the user. Latency was measured by recording real conversations and diarizing them with Pyannote across region and tunnel configurations.

  • How Decagon shipped real-time voice AI on Modal

    Modal hardMaster

    Decagon Voice 2.0 cut latency by 65% by replacing large frontier models with small open-source models fine-tuned through augmented multi-domain data, curriculum and mixed-objective SFT, and reinforcement learning. Modal's inference team trained a custom EAGLE3 draft model for speculative decoding by forking SpecForge, pre-training on broad conversational data and fine-tuning on Decagon's domain data, which gave 38% higher accept lengths than open-source baselines. They also built an asynchronous scheduler that made SGLang's speculative decoding sync-free, removing CPU stalls from the critical path, eliminating GPU idle time on H200s and improving throughput by up to 12%. The scheduler work is being upstreamed to SGLang.

The quest for software engineering knowledge.

Look:
Layout: