Smart speaker voice bridge

Uses a smart speaker for voice input and output while the processing runs on a local MacBook.

#smart speaker#speech recognition#text-to-speech#local LLM#Claude
Voice bridge

WorkflowVoice bridge

Voice & smart home Local MacBook and a smart speaker

Streams a smart speaker's microphone audio to a server on the Mac, where speech recognition, answering and speech synthesis all happen, and plays the answer back on the speaker. Each wake word can be mapped to a different brain: a local model or Claude.

Challenge

  • Off-the-shelf smart speakers go through the maker's cloud, and you cannot choose which AI answers
  • Relying only on a cloud AI means silence whenever the connection drops or the usage quota runs out

Approach

  • The speaker connects to a server on the Mac using a published protocol, and recognition, answering and synthesis are all done on the Mac side
  • Brains are switched in a config file. The question-only Claude brain has no tools at all, and the agent brain added later may use only the skills and MCP tools named in its config. If the main brain does not respond, a local model answers instead

Outcome

  • From the end of speech to the start of the answer: about 2 s with the local model and about 4 s with Claude (the author's measurements)
  • Changing brains means editing config and restarting, with no code changes

The author is building a voice path between a smart speaker, a home automation hub and Claude. The author studied published reference implementations, extracted requirements from them, and wrote the server side from scratch with test-driven development.

The speaker role can also be played by the Mac's own microphone and speakers speaking the same protocol. To the server every speaker is just a client, so development and testing can proceed without the physical device.

Voice bridge
Overview: roles, tasks, work products and the rework loop

Key points

Assigning a brain per wake word. One word goes to the local model, another to Claude, set in config. A fallback brain is mandatory: when the main brain does not answer, the reply starts by saying Claude did not respond and the local model is answering instead.

Limiting what Claude can do. The question-only brain runs with a no-tools setup; when the CLI updates, a one-time self-check at startup confirms there are no tools and that authentication goes through the subscription. The agent brain that can call skills and MCP is allowed only the ones named in its config, never commands or file writes, because anyone talking near the speaker can trigger it.

Designing for interruptions and waiting. Speaking the wake word during playback stops it and goes back to listening. When the connection drops, the main brain is cut off at a time limit and the fallback takes over.