How our Pipecat voice pipeline is wired

A short write-up of the Bridge's voice pipeline (self-hosted Pipecat, Oct 2026): what's in it, measured numbers from real calls, and the choices that keep the gap between "you stop talking" and "the agent starts talking" short.

The short version. Nothing waits for anything else to finish. The transcript is warm before you stop talking, the end of your turn is detected by a model (not a fixed silence timer), the agent's reply is streamed out the moment it starts, and speech synthesis starts on the first sentence while the rest is still being written. Everything runs on one machine on the same LAN as the client.

The pipeline

Everything in the blue box is one Pipecat pipeline: a single Python process (a macOS LaunchAgent on an M1 Max). Audio frames flow left to right through each Pipecat service, and every stage passes partial results on as soon as it has them.

Browser

πŸŽ™οΈ Micyou talk
πŸ”Š Speakeragent's voice
⇄

Pipecat bot (Python, on the M1)

SmallWebRTCTransportpeer-to-peer audio in/out, LAN
Silero VADspeech started / stopped
β†’
Smart Turn v3model: are you done?
WhisperSTTServiceMLX (our interim-transcript subclass; large-v3-turbo on Metal)interim transcript every 0.7 s while you talk Β· final β‰ˆ1.4 s after
OpenAILLMService β†’ the brainsends your turn, streams reply text back (SSE)
ElevenLabs TTS service (websocket)first sentence β†’ audio in β‰ˆ0.5 s, rest streams behind
Barge-in + echo guard2 real words interrupt it; the agent's own voice is ignored
⇄

Elsewhere

🧠 The Bridge/v1/chat/completions β†’ the live agent (memory + tools)
☁️ ElevenLabsvoice synthesis
One turn, on a timeline (a typical quick reply; seconds)
You speak
talking…
Whisper (interims)
transcript builds as you talk
VAD + Smart Turn
done?
Agent thinks
first words
ElevenLabs TTS
You hear it
speaking… (rest streams in)
0246810
The stages overlap: STT runs while you talk, and audio starts while the agent is still writing. The orange bar (the agent thinking) is the only one that grows with the question.
StageWhat we useWhy it's fast
TransportSmallWebRTCTransport, peer-to-peer from the browser to the botNo media server or cloud hop. The bot runs on an M1 Max on the same LAN (reachable over VPN when away).
Speech detectionSilero VAD (start β‰₯ 400 ms, min volume 0.75)Cheap, local, frame-by-frame.
End of turnSmart Turn v3 (local model) on top of VAD; VAD stop 1.0 s, hard cap 3.0 sA model decides whether you're done, rather than waiting out a long silence window. Natural pauses mid-thought don't end the turn, and a finished sentence doesn't have to wait for a long timeout.
Speech-to-textWhisper large-v3-turbo on MLX (Apple Metal), in-process. Interim transcripts every 0.7 s while you talk. Model is warmed at boot.No network round-trip for STT. The transcript is mostly built before you stop. The first call doesn't pay a ~6 s model load.
BrainThe live agent behind an OpenAI-compatible /v1/chat/completions endpoint that streams SSEPipecat's stock OpenAILLMService talks to it. The endpoint posts the user turn to the agent and streams reply text back as each block is written, not when the whole reply is done.
Text-to-speechElevenLabs over a websocket (v3/v4 via the Text-to-Dialogue socket, otherwise multi-stream)Audio starts on the first sentence. Measured TTS time-to-first-audio is usually ~0.4–0.6 s.
Barge-in2 recognized (non-echo) words interrupt the agent; an echo guard drops the agent's own voice from the speakersYou can cut in without false triggers from room noise or the agent hearing itself.

Measured on real calls (Oct 13–14)

From the bot's Pipecat metrics. "End to end" is from the moment the turn was judged over to the first audio out.

MeasureTypicalNotes
STT final after you stopβ‰ˆ 1.4 sWhisper on the M1, largely overlapped by the turn-detection wait.
Brain endpoint first byte0.04–0.13 sThe stream opens immediately. Real text follows when the agent writes it.
TTS first audio0.4–0.6 sOccasional spikes to 1–2 s on longer first sentences.
End to end, conversational reply0.7–5.5 sBest seen 0.68 s; most quick replies land at about 3–5 s.
End to end, agent doing real work10–35 sWhen the agent runs tools before answering (checks logs, reads code). That time is the work itself, not the pipeline.
Honest caveat. The pipeline overhead is small, about 1.5–2 s, and most of it is turn detection plus STT. The rest of any delay is the brain. Our brain is a full agent with memory and tools, not a bare LLM call, so its thinking time is the big variable. What makes it feel fast is the next section.

What actually makes it feel fast

  1. Stream at every boundary. STT interims while speaking, SSE from the brain, sentence-level TTS start, WebRTC playback. If any stage waits for a complete result before passing it on (a full transcript, a full reply, a full audio file), you add seconds.
  2. Say something first, then do the work. The agent is instructed to lead with a short spoken line ("Let me look at that…") before it runs tools. That line streams straight to TTS, so you hear a voice in about 1 s even when the full answer takes 20.
    Next step we're weighing: right now this is an instruction the agent can occasionally skip. Agent harnesses like Claude Code support hooks, scripts that run automatically at fixed points such as "before a tool call." A PreToolUse hook could notice that the agent hasn't said anything yet this turn and either remind it to speak first or block the tool call until it does. That turns "say something first" from a habit into a guarantee, at least for voice turns.
  3. Model-based end-of-turn, not a long silence timer. Many stacks wait 1.5–2 s of silence and still cut people off. Smart Turn lets us use a short VAD stop with a 3 s ceiling.
  4. Keep STT local and warm. Cloud STT adds a round-trip plus queueing. MLX Whisper on Apple Silicon is fast enough for interims, and a warm-up at boot removes the cold first turn.
  5. Set Pipecat's STT latency budget correctly. ttfs_p99_latency unset defaults to 1.0 s, which equals our VAD stop and collapses the STT wait to zero. Slow transcripts then land after the turn ends, producing an empty turn and a wasted LLM call. We set it to 2.5 s.
  6. Keep the media path short. P2P WebRTC to a box on the LAN. No TURN relay or media server when you don't need one.

If you're at 4–5 seconds, check these first

Stack: Pipecat 1.x (Python, uv), Whisper large-v3-turbo via mlx-whisper, Silero VAD, Smart Turn v3, ElevenLabs websocket TTS, SmallWebRTC, running as a macOS LaunchAgent on an M1 Max (64 GB). The brain is a custom OpenAI-compatible endpoint in front of our agent.