What Self-Hosting My Voice Stack Actually Cost
I swapped one speech provider at a time under the same local LLM. Self-hosting cost 256ms per turn: 233ms of it in speech recognition, and about 23ms in the synthesis I expected to hurt.
Aegis is a voice assistant I built for my homelab. I talk to it in a browser, and it answers questions about live infrastructure by calling tools. Under the hood it is a Pipecat pipeline over WebRTC, Silero VAD and Smart Turn v3 for deciding when I have finished speaking, and qwen3:14b on Ollama on one RTX 3090. Speech recognition and speech synthesis can each run on that same machine (faster-whisper and Kokoro, served by speaches) or on a hosted API (Deepgram and Cartesia).
I built it that way to answer one question: what does keeping my voice on my own hardware cost, in milliseconds, and where?
One seam, one swap at a time
Exactly one module in the codebase chooses a vendor. Everything downstream talks to Pipecat's abstract speech-to-text, LLM and text-to-speech services, so moving a stage between local and hosted is a configuration change.
That made a clean experiment possible. Three configurations, the identical utterance script, the identical local LLM, one provider changed at a time:
- A: local STT, local TTS
- B: Deepgram STT, local TTS
- C: Deepgram STT, Cartesia TTS
The harness plays synthesized speech into the real pipeline at realtime pace, with real VAD, real endpointing and the real provider clients, and records each stage of every turn. It is headless: no WebRTC leg, no jitter buffer, no playback device. Each configuration got 9 to 12 turns per turn type, measured on 2026-08-28. The LLM is local in all three, so C means hosted speech with my own model behind it.
The result
Median seconds, turns that called no tool:
| Stage | A | B | C |
|---|---|---|---|
| transcript ready | 0.352 | 0.072 | 0.100 |
| end of speech to LLM request | 0.368 | 0.151 | 0.151 |
| LLM request to first token | 0.173 | 0.189 | 0.185 |
| first token to first audio | 0.270 | 0.281 | 0.259 |
| voice-to-voice | 0.853 | 0.620 | 0.597 |
Self-hosting both stages cost 256ms per turn. Swapping only speech recognition recovered 233ms of that. Swapping synthesis recovered another 23ms. On turns that called a tool, the same two swaps were worth 360ms and 2ms.
Nearly the whole price of privacy sits in one stage. I expected batch recognition to be expensive, and it was. The surprise was synthesis.
Why streaming synthesis did not matter
I expected synthesis to hurt. Cartesia streams audio over a websocket as tokens arrive; Kokoro synthesizes a whole sentence per request. On paper that should decide it.
It didn't, because time-to-first-audio is mostly waiting for the LLM to finish its first sentence. Measured on its own, Kokoro renders 1.43 seconds of speech in 64ms once warm. Streaming saves the tail of a 64ms operation that is queued behind a much longer one.
I hold the 23ms loosely. Between runs B and C the LLM stage agreed to within 4ms, so the harness itself is stable, but Deepgram's transcript time moved 28ms between the same two runs. The fair reading is that local synthesis is somewhere between free and about 30ms behind, which is too small to justify a dependency on latency grounds alone.
The reading I got wrong first
My first pass at this table concluded the opposite about transcription. Local Whisper finished at 0.352s and the turn was released at 0.366s, so Whisper looked done and idle, and turn detection looked like the real constraint. I wrote that faster STT "would buy approximately nothing".
That was a dependency misread as a coincidence. Pipecat's default turn strategy releases a turn only when the turn analyzer says the speaker is finished and a finalized transcript has arrived (wait_for_transcript=True). Transcription finishing just before the turn ends is exactly what that rule produces.
The model that fits the data:
wait ~= max( transcription , turn detection )
With local batch Whisper the transcript is the later of the two, so STT gates the turn. With Deepgram the transcript lands at 0.072s and the turn analyzer becomes the floor, which is why the wait stops at about 0.15s and goes no lower.
That gives a ceiling as well as a cost. Moving the wait from 0.368s to 0.151s is about 217ms, and no faster local recognizer, streaming or otherwise, can buy more than that, because turn detection is waiting underneath it. Past that point the only levers left are the VAD stop time (0.2s here) and the turn analyzer itself.
Why measuring beat reasoning
The provider seam was justified by two arguments from architecture. Batch STT cannot start until you stop talking, so it should dominate. Buffered TTS cannot speak until a sentence exists, so it should hurt too. The first was right and worth 233ms. The second was worth 23ms. The detour in between, that STT was off the critical path, came from reading a single provider's data. Three plausible arguments, and only running a second provider separated them.
Batch transcription was also milder than I feared on its own: 4.4 more seconds of audio cost 112ms more transcription on the 3090. And the LLM stage is only 0.173s because reasoning is switched off. In an isolated benchmark, turning it off took 3.27s off the median time to first token, all of it hidden thinking that I would otherwise have sat through in silence.
What these numbers are not
They are headless, warm, and small, with 9 to 12 turns per row. A live browser session on 2026-09-04, fully self-hosted, came in at 2.776s median and 6.733s p95 over 25 turns. That is more than three times the harness figure, because it includes the network, the browser, my real phrasing and real tool calls. The harness is the instrument for comparing stages. It cannot tell me what using the thing feels like, and the gap between those two is the subject of the next post.
Production still runs fully self-hosted speech. The 233ms is now a number I chose to pay, which is a better position than a cost I had only guessed at.
Written by
Adrian Romo
Senior Backend Engineer: Python backends, AWS, enterprise integrations, realtime voice systems, and AI infrastructure.
Related
Keep reading
Four Hours of CPU Nobody Asked For
In October this site was suspended on Vercel's free tier and its Neon database ran out of compute. Traffic was not the cause. Pages regenerating on timers were, and removing the timers took daily CPU from minutes to seconds.
The Update Cron That Patched Nothing
A weekly LXC update job fired on schedule for about sixteen months and installed nothing: a 404 script URL, with the error sent to /dev/null. Auditing every update mechanism found zeroes that meant nothing.
The Tool Nobody Called
I gave my homelab's agents one tool for grounded answers. It served 1 of 69 lookups, and my voice assistant called it in 0 of 32 turns. The nudges meant to fix that had been going to a debug log.
Keep going
Where to next?
Browse more technical writing, see the engineering case studies, or reach out directly.