Notes ·

The Atlas voice pipeline

Atlas is a personal assistant that runs on a Linux server in my house, with a local language model on an older GPU. I designed, directed and shipped it as an AI-assisted project. This note covers the voice path: I say "Hey Atlas", ask something, and hear an answer in my headset. It works today, and most of the decisions came from fitting it onto modest hardware.

PC and server

The pipeline is split between my Windows PC and the server. A small companion app on the PC owns the mic and speaker. It dials out to the server over an encrypted WebSocket link. The server never connects to the PC, because its LAN egress is blocked. On the server, the voice service is a library hosted inside the agent process.

Listening on the PC

The companion runs three small models, all on ONNX Runtime, so the PC side needs no PyTorch for listening:

  • openWakeWord for the wake word. The stock models don't include "Hey Atlas", so Atlas uses a custom-trained model. It runs at a threshold of 0.85, which costs under a point of recall for about 40% fewer false wakes than 0.6. Push-to-talk stays as a backup, through RegisterHotKey rather than a low-level keyboard hook, because a hook sees every keystroke and looks like a keylogger.
  • Silero VAD v5 finds the pauses, at about 1 ms per 32 ms window on one thread.
  • Smart Turn v3.2 decides whether a pause is the end of a thought. By default it can only extend the fixed 700 ms silence wait, up to two seconds, so a mid-sentence pause isn't cut off. An "early" mode would answer about 500 ms sooner, but on the tuning set it cut off far more short pauses. It runs in shadow, logging what it would have done, so real turns can settle the choice.

Mic audio streams to the server in 80 ms chunks with a 300 ms preroll that includes the wake phrase.

On the server

Speech-to-text is faster-whisper large-v3-turbo on a GTX 1080 Ti. That card is Pascal, where float16 isn't fast and silently falls back to float32, so the code refuses fp16 and runs int8. The CTranslate2 version is pinned to the first release whose Linux wheel lists that GPU architecture explicitly. If the GPU load fails, for example because the language model holds the card, it falls back to a smaller model on the CPU. Recognition is segment-based rather than streaming, since the PC's VAD has already ended the utterance. A filter drops Whisper's classic silence hallucinations ("thanks for watching") and strips the leading wake phrase. Models load only from local, hash-checked files.

The reply comes from one agent turn in a voice mode: no thinking, at most 400 tokens, and a style prompt asking for one to three short spoken sentences with no lists, links or code. Text streams into a sentence chunker that releases the first clause early, and each chunk goes to text-to-speech. If the route needs tools or thinking, a pre-rendered filler like "On it." plays first.

Where the voice gets rendered

The target is under 1.2 seconds from the end of speech to the first audio. My estimate for the server's CPU came out at roughly 1.25 to 1.85 seconds, and the measured cost on the server was about two seconds per sentence for Kokoro TTS. So when I'm at the desk, the server sends reply text sentence by sentence and the PC renders it. The live voice is now Kyutai's Pocket TTS on the PC's CPU. On my PC the first audio of a sentence arrived in 94 ms. Kokoro stays as a fallback that takes over for good if Pocket fails to load or fails on a sentence before any audio. If the PC can't render, the server sends audio instead. Every turn writes a latency row (STT, routing, first token, first audio) so p50 and p95 come from real turns, not estimates.

Barge-in

If I talk over Atlas, it stops. On the PC, the audio engine is a small state machine: while it's speaking, speech above a minimum length, the wake word or push-to-talk stops playback and opens a new utterance. On the server, a new utterance cancels the running turn. Cancelling closes the model's HTTP stream, so generation actually stops, and the turn returns a partial result marked as interrupted rather than raising. Atlas stores what was actually spoken plus "(interrupted)" in the history, so the model knows what I heard, not what it meant to say.

There's no echo cancellation yet, which is the main limit. Voice barge-in is on only when the output is headphones or a headset. On speakers, Atlas would hear itself, so barge-in there needs the wake word or the hotkey.

About Atlas · All notes