Real-time voice assistant
Build a streaming voice agent (ASR, turn detection, LLM, TTS) with barge-in and non-blocking tool calls, then measure latency, WER, false cutoffs and behaviour under packet loss.
The capstone and what it builds on
- 1Real-Time Voice Assistant (ASR to LLM to TTS)The capstone brief
- 2Speech Recognition (ASR) - CTC, RNN-T, AttentionPhase 6: Speech and audio
- 3Text-to-Speech (TTS) - From Tacotron to F5 and KokoroPhase 6: Speech and audio
- 4Real-Time Audio ProcessingPhase 6: Speech and audio
- 5Build a Voice Assistant Pipeline - The Phase 6 CapstonePhase 6: Speech and audio
- 6Voice Activity Detection & Turn-Taking - Silero, Cobra, and the Flush TrickPhase 6: Speech and audio
- 7Audio Evaluation - WER, MOS, UTMOS, MMAU, FAD, and the Open LeaderboardsPhase 6: Speech and audio
- 8Voice Agents: Pipecat and LiveKitPhase 14: Agent engineering
- 9Function Calling & Tool UsePhase 11: LLM engineering and RAG
What You'll Build
A voice assistant that streams end to end: microphone audio in, streaming ASR partials, VAD plus a turn detector, a streaming LLM, streaming TTS out. It must handle barge-in, call tools on a side channel without stalling audio, and ship with a reproducible eval harness that reports latency, word error rate, false cutoffs and behaviour with dropped packets.
Requirements
- Streaming session: browser microphone over WebRTC (LiveKit Agents or Pipecat) or a local streaming loop over WebSocket or the system mic, processing 20 ms frames.
- Streaming ASR (faster-whisper, Vosk, or a hosted streaming ASR) emitting partial and final transcripts, with per-partial latency logged.
- VAD (for example Silero) plus a turn-detection rule: commit a turn only when silence exceeds a configurable threshold and a completion score on the partial transcript exceeds a configurable threshold. The completion scorer can be a small model or your own classifier.
- Streaming LLM whose first token is handed straight to a streaming TTS (Piper, Kokoro, or a hosted TTS); log the gap from first LLM token to first audio chunk.
- Barge-in: user speech during TTS playback cancels TTS, drops the remaining LLM output and re-arms ASR; a
tts_canceledevent is logged. - Tool side channel with at least two tools (for example a mocked weather API and a calendar). Calls run concurrently; if a tool takes more than 300 ms the agent speaks a short filler and resumes when the result arrives.
- Eval harness driven by a synthetic caller playing at least 30 recorded test utterances or calls with reference transcripts (include utterances with mid-sentence pauses). It computes WER, false-cutoff rate, first-audio-out p50 and p95, tool-call correctness and a per-stage latency breakdown.
- Packet-loss test: rerun the harness with 3% of input frames dropped and report WER and turn-taking changes.
- Concurrency test: at least 5 simultaneous sessions with p95 first-audio-out reported.
Constraints
- Model-agnostic: any OpenAI-compatible endpoint (including the KatalockAi API) or a local model (for example via Ollama, llama.cpp or vLLM) may be used. No named commercial model is required; record which model you used in the README.
- CPU path: faster-whisper small or base, Silero VAD, Piper or Kokoro TTS and a small local or remote LLM all run on a laptop. You may not reach the lesson's 800 ms p50 target on CPU; report the numbers you get and where the time goes.
- Substitution: the lesson uses 100 recorded calls, a hosted benchmark and 50 concurrent calls on a cloud GPU. Here 30 or more recorded test calls, a 3% frame-drop simulation and 5 concurrent sessions are accepted. TTS quality may be scored with NISQA or a small listener rating; say which.
- Record your own test audio (or use openly licensed speech) so your eval set is unique to you.
Stretch Goals
- Compare three barge-in policies during a tool call: hard cancel, finish tool then stop, queue next turn.
- Tune VAD and turn-detector thresholds on long-pause utterances for lowest false cutoffs within a latency budget.
- Add a non-English language and measure VAD false triggers.
How to Submit
- Public GitHub repo with
agent/(pipeline),tools/,eval/(audio manifest, harness, results) andREADME.md. - README: how to run a live session and the eval, a latency waterfall per stage, the threshold choices you made and their trade-offs, and limitations.
- Paste the eval summary (WER, false-cutoff rate, first-audio-out p50/p95, tool correctness, packet-loss rerun) and one annotated session log.
How It's Reviewed
Professor Katalock reads your repository and the evidence you paste, and scores each criterion out of 100. You pass with a weighted total of 70 or more and no criterion below 40. A copied or padded submission is flagged and fails.
Submit
Push your work to a public GitHub repository with a README that explains how to run it, then paste the evidence below. Up to 3 reviews a day, free.
- Eval summary output: WER, false-cutoff rate, first-audio-out p50/p95, tool-call correctness
- Packet-loss rerun results next to the clean run
- One annotated session log showing partials, turn commit, first token, first audio, a barge-in and a tool call with filler
- Per-stage latency table
- Optional: link to a short screen recording of a live conversation (not required)
Reviews are done by AI against the rubric above. They check the evidence in your repository; they are not a substitute for a human code review, and a review can be wrong. If you think it is, improve the README so the evidence is unmistakable and resubmit.