All projects

Jarvis voice assistant

active
Jarvis voice assistant hero illustration

A voice for the Claude Code session I work in. It speaks each answer the moment it has one. It got there in three cuts, from an agent stack to a small harness to voice output for the live session.

PythonClaude Code hooksVoiceBoxSuperWhisperPorcupinelaunchd

Voice input already worked. I dictated to Claude Code with SuperWhisper. But everything after that was by hand: the words went to the clipboard, I pasted them into the session, pressed Enter, and read the answer as text on the screen. An issue from November 2025 lists those four steps, and the last one says it plainly: the response comes back as text, no audio.

Jarvis closes that loop. Today the Claude Code session I work in speaks its answers out loud, and it speaks the moment it has a line, before it does the slower work behind it. Voice is how I prefer to work with Claude Code, and the agents on my team use the same voice to tell me when they need me.

It took three cuts to get there. Each one removed a layer and kept what was working.

Who built it

Jarvis is mine: the goal, the direction, and the calls about what to keep and what to cut. I build it with a team of AI agents, and “we” on this page means that team. They wrote much of the code, ran the spec-driven builds, and measured the experiments.

Three cuts

From a service to one file

The first design, in November 2025, was a coordinator daemon on the Mac in TypeScript that talked to a Jarvis server, built as an MCP (Model Context Protocol) server, on another machine. It was heavier than the problem. In early December we replaced it with one Python file of under 300 lines that ran the whole loop on the Mac, where the microphone and the speaker are: wake word, recording, speech to text, a model, and speech out.

The project’s constitution, written that day, puts the reason in its first principle: “Too much engineering leads to obscene complexity and projects that never complete. Build the minimum complexity required to deliver the intended functionality.”

From an agent stack to a thin harness

The same day, we added an agent framework (LangGraph) with web search, multi-turn context, and source citations, through a full spec-driven pass. The file grew to about 630 lines, with a small local model as the brain, a local speech-to-text model on the CPU, and the Mac’s built-in voice for speech.

In July 2026 I cut it back. My instruction for the rebuild was short: “purge that stuff for the most part, only keep the parts we need and that are actually working.” We kept the wake word and the conversation loop. We removed the local brain, the agent framework, the local speech-to-text, and the built-in voice. Speech in both directions went to a speech service (VoiceBox) on our GPU server, and the brain became a setting: Anthropic by default, OpenAI, the Claude Code command line, or a local model. The file came out at about 500 lines.

From a second assistant to a voice for the session

The third cut came the same day, July 5, and it changed what Jarvis is. The rebuild was still a standalone assistant: a wake word, then a separate brain with its own context. In the design review I pushed back. I already talk to Claude Code. That session has the context and the memory I work with. A second brain would duplicate it.

So the daily product became a voice output for the live session. Voice in stays SuperWhisper. The brain is the session itself. The only new piece is how the answer gets out. The standalone harness stays in the repository, but it is no longer the main path.

Speak first

The first way out was a hook that ran at the end of each turn, read the finished message and queued it for speech. It worked, but it had two problems. It waited for the whole turn, so the answer sat behind all the housekeeping that came after it. And it raced the transcript file, so it often read the previous turn’s message and fell a turn behind.

By that afternoon we had replaced it. Now the model calls a small command, jv-say, the moment it has a line, and does the slower work after. The speech is the exact text the model chose, inside the turn. The project’s notes put the effect in one line: “You hear the answer right after the reasoning, not after the plumbing.”

Two more choices keep it usable. One player process on the Mac drains a single queue, so sessions on different machines never talk over each other. And the two channels have different jobs: the audio is a conversational narration for the ear, and the terminal stays the record of facts, paths, and commands I will want to read again. On a turn with a real wait, the session first speaks a short holding phrase, so there is no dead air while it thinks.

How it’s built

  • Voice output for the live session: a queue and player of about 200 lines of Python on the Mac, run by launchd, with controls to pause, resume, mute, skip, and flush. jv-say (about 65 lines) queues a line from any session. A 22-line hook reminds the session on each prompt that it can speak; the model decides when to. The player speaks through VoiceBox.
  • Standalone harness: one Python file, built around a wake word (Porcupine, listening for “jarvis”). An energy-based voice activity detector records until 3 seconds of silence, up to 60 seconds; the speech service transcribes; the brain answers; the speech service speaks; then a 15-second window takes a follow-up without the wake word. A --check flag runs a speech round trip with no microphone, so it can be tested on a headless machine.
  • Speech service: VoiceBox on our GPU server. The standalone harness uses it in both directions; the voice output uses it to speak.

What’s next

The goal now is a real conversation at talking speed: Jarvis listens while it speaks, and I can cut in. In October 2026 I asked the team to build it overnight, following a published approach to “micro-turn” voice agents: every 0.6 seconds the model either answers or keeps listening. We ran it on CPU first, with a public adapter.

It behaves the way it should, and it is too slow. In a test, it stopped talking at “wait wait.” But each turn has a budget of 600 milliseconds, and the median warm turn took 912 milliseconds. Starting the speech models on demand, with an idle unload after 300 seconds that I approved, brought the cold start down to a measured 44.8 seconds, from 86 to 162 seconds in earlier logs. It speaks now, but not yet at talking speed. A design review named the speech-recognition stage as the root fix, and replacing it is the proposed next step.

About the author

Carlos Mendez

Carlos Mendez

IT support and systems, Maui, Hawaii

I come from IT support and systems work. I build and run my own infrastructure and the production websites for West Maui Tech, my business, and I build AI tooling on top of that stack. I write here about what I run, what broke, and how I fixed it.