Menu

Building a local voice agent pipeline: VAD faster-whisper streaming TTS — no cloud APIs
📰

Building a local voice agent pipeline: VAD faster-whisper streaming TTS — no cloud APIs

DEV Community: ai·Nexus Foundry·10 days ago
#rQpjGShq
#devtoai#devto#dev#voice#whisper
Long article (370 words) — no AI summary yet.
Reading 0:00
15s threshold

Cloud voice APIs are easy until you count the latency stack: STT round-trip + LLM round-trip + TTS round-trip, each adding 300–800ms. For real-time voice agents that adds up to a conversation that feels like a walkie-talkie. I built a fully local pipeline — the same architecture inside my $20 voice-agent kit — that keeps everything on one machine.

The pipeline

mic → webrtcvad (speech detect) → faster-whisper (STT) → sentence-buffered LLM stream → Piper TTS → speaker

Enter fullscreen mode

Exit fullscreen mode

Four stages, each chosen for a specific reason:

1. VAD first, always. webrtcvad gates the audio before it hits the STT — without it you're transcribing silence and burning CPU. Speech detection at frame level, not utterance level.

2. faster-whisper over openai-whisper. CTranslate2 backend — roughly 4x faster than vanilla whisper at the same accuracy on CPU. For real-time you need the transcript before the speaker finishes the next sentence.

3. Sentence-buffered LLM streaming.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.