Get Started

Talk to your AI out loud, in real time, fully offline

Speak, pause, and a local AI answers in a natural voice; talk over it and it stops to listen. Build the whole voice loop yourself in one Python file: pause detection, Whisper, a streaming LLM, sentence-by-sentence speech and interruptions. Then tune it from 3.9 seconds to 1.7 seconds on a laptop with no graphics card.

90 minIntermediateTools: FreeStep 1 free
A working voice assistant in one Python filemicrophone in, natural speech out, nothing sent online
Interruptions that worktalk over it and it stops speaking, cancels the rest of the answer and listens
A latency breakdown for every turn, so you can see exactly where the seconds go
  • A test conversation you can replay without a microphone, to tune and compare settings
  • Measured settings that cut response time from 3.9 to 1.7 seconds on a CPU
Before you start
● What you'll have in 90 minutes
Preview
Both sides of a test conversation run through this mission's pipeline on a laptop CPU: a question, an interruption mid-answer, a follow-up.
01/07How a real-time voice loop works0 done
STEP 01 of 07~10 min

How a real-time voice loop works

Five stages, and the trick that makes it feel quick: start speaking before the answer is finished.

  1. The loopthe microphone streams 30-millisecond frames. Pause detection watches the volume and decides when you've finished (600 milliseconds of quiet, by default). faster-whisper turns your speech into text. Ollama streams the answer word by word. A splitter cuts the stream into sentences, and each sentence goes to text-to-speech (Kokoro or Piper) and out of the speaker.

  2. The trick: don't wait for the whole answerAs soon as the first sentence is complete it's spoken, while the model is still writing the second. Time to the first sound is what makes a voice assistant feel alive, and it's the number this mission measures: from the moment you stop talking to the moment audio for the reply is ready.

  3. Interruptions ("barge-in") are the other half. While it talks, the microphone keeps listening. If you speak for a quarter of a second, it stops playback, closes the stream from Ollama so the model stops writing, throws away any queued sentences, and treats what you're saying as the next turn.

  4. Get the kitvoice-chat.zip has talk.py (the whole pipeline) and make_test_audio.py. kit.md has the download commands, every setting and a troubleshooting checklist.

✓
CheckpointYou can name the five stages, and which one decides when your turn is over.
Stuck? Ask the community
Next mission · Own your AIGive your webcam a brain: local AI that reads, counts and reacts
→