Dante
A voice-controlled AI assistant for macOS: about 90,000 lines and 840 tests in six weeks.
- Context
- Dante is a voice-first assistant for my Mac. Say the wake word and it answers out loud, reads my calendar and email, plays Spotify, places calls and controls the computer behind a guard that stops destructive actions, with a phone app that syncs through Supabase. It started as my HSC Enterprise Computing major project and grew far past the brief.
- Role
- I designed the system and the voice pipeline and built it with AI coding agents as pair programmers: about 90,000 lines and 840 tests, in 660 commits between 18 May and 28 June 2026.
- Stack
- Electron, React and TypeScript; openWakeWord and faster-whisper running locally in Python; Groq with an Ollama fallback; Edge TTS with ElevenLabs and Fish Audio fallbacks; Supabase; Vitest.
- Visit
- Watch the demo
The hard problem
Talking back in about a second
At first every stage waited for the one before it: recognition waited for silence, the model wrote its whole reply, the speech engine rendered all of it, and only then did any audio play. Each wait was small; together they turned a conversation into a batch job. I overlapped the stages. Speech is streamed: each audio chunk crosses from the Electron main process to the window on its own IPC channel and is appended to a MediaSource buffer, so playback starts on the first chunk. The model's reply is split into sentences as it streams, and each finished sentence is spoken while the next is still being written, over one Edge TTS connection kept open instead of reopened per sentence. A model call that only classified the request gave way to keyword routing, Groq runs first with a local fallback that fails fast, and the speech recogniser stays loaded between utterances. In my own testing a typical reply now starts in about a second, down from two to twelve. Talking over Dante cuts it off.