Guide
Hear Claude Code when it’s done
Claude Code has no built-in spoken replies. Its /voice command is dictation: you talk, it types. To make it talk back, you need one hook. Below is a working config for macOS, Linux and Windows, then better ways to do it.
Updated
The 30-second version
Open ~/.claude/settings.json (create it if it isn’t there) and add a Stop hook. Stop fires when Claude finishes responding.
{
"hooks": {
"Stop": [
{ "hooks": [{ "type": "command", "command": "say 'Claude Code is done'", "async": true }] }
]
}
}Linux — the same block with a different command. Use spd-say if you have speech-dispatcher, or espeak-ng:
{ "type": "command", "command": "spd-say 'Claude Code is done'", "async": true }Windows — PowerShell speaks through the system voice:
{ "type": "command", "command": "powershell.exe -NoProfile -Command \"Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('Claude Code is done')\"", "async": true }Type /hooks in Claude Code to check that the hook is listed under Stop. Then ask Claude anything short. When the answer is ready, your computer says so.
Sources: Claude Code documentation
/voice is input, this is output
/voice turns on dictation: you hold a key, speak, and your words appear in the prompt. Claude Code still answers in text. Everything on this page is the other half: the answer, out loud.
Sources: Claude Code documentation
What to announce
You can speak at more than one moment. These are the events worth a voice:
| Event | When it fires | What to say |
|---|---|---|
Stop | Claude finishes responding | “Done”, or a summary |
Notification, matcher permission_prompt | Claude needs you to approve something and has waited about six seconds | “Claude needs your approval” |
Notification, matcher idle_prompt | Claude finished about 60 seconds ago and you haven’t typed since | “Claude is waiting for you” |
SubagentStop | a subagent finishes | usually nothing: it gets noisy |
StopFailure | the turn ends because of an API error | “Claude stopped with an error” |
The approval prompt is the one people miss most. Claude stops, the terminal sits in another window, and twenty minutes pass. Add it next to Stop:
{
"hooks": {
"Stop": [
{ "hooks": [{ "type": "command", "command": "say 'Claude Code is done'", "async": true }] }
],
"Notification": [
{ "matcher": "permission_prompt", "hooks": [{ "type": "command", "command": "say 'Claude Code needs your approval'", "async": true }] },
{ "matcher": "idle_prompt", "hooks": [{ "type": "command", "command": "say 'Claude Code is waiting for you'", "async": true }] }
]
}
}Sources: Claude Code documentation: Automate actions with hooks, Claude Code documentation: Hooks reference
Say what happened, not just “done”
“Done” tells you to come back. “All 85 tests pass” tells you whether you need to.
A hook gets a JSON object on its standard input. For Stop, that object has a field last_assistant_message with the text of Claude’s last reply. Take the start of it and speak that instead of a fixed phrase.
Save this as ~/.claude/hooks/say-summary.sh and make it executable with chmod +x:
#!/bin/sh
# Reads the hook's JSON from stdin and speaks the start of Claude's last message.
jq -r '.last_assistant_message // "Claude Code is done"' \
| tr '\n' ' ' \
| sed 's/[`*#_]//g' \
| cut -c1-200 \
| sayThen point the hook at it:
{ "type": "command", "command": "~/.claude/hooks/say-summary.sh", "async": true }What each line does: jq pulls the reply out of the JSON, tr joins the lines, sed drops the Markdown marks so the voice doesn’t read asterisks, cut keeps the first 200 characters, and say speaks them. On Linux, replace say with spd-say -e.
Two hundred characters is about fifteen seconds of speech. Shorter is better: if you ask Claude to start its last message with a one-line result, the first sentence is all you need to hear.
Sources: Claude Code documentation
Don’t block the agent
"async": true runs the hook in the background. Without it, Claude Code waits for the command to finish — and a voice reading two hundred characters takes a while. With it, the voice talks and Claude is already free.
Sources: Claude Code documentation
Four ways compared
| Hook and system voice | A text-to-speech MCP server | A ready-made plugin | DuoWave | |
|---|---|---|---|---|
| Setup | five lines in one file | install a server, add it to Claude Code | one install command | install an app |
| Voice | the one your system has | depends on the server; often a cloud voice | system voice or a cloud voice | a voice on your computer, or a cloud one if you want it |
| When it speaks | always: a hook is deterministic | when the model decides to call the tool — or always, from a hook | always | when the task is finished, and when you ask |
| Does text leave your computer | no | yes, if the voice is a cloud one | yes, if you pick a cloud voice | not for the voice, unless you pick a cloud one |
| Cost | free | free, or the price of the cloud voice | free, or the price of the cloud voice | free |
| What else it does | nothing | nothing | sounds, window focus | starts the task and reports back |
A note on MCP servers. The usual advice is to add a line to CLAUDE.md: “call the speak tool when you finish”. That leaves it to the model, and sometimes it forgets. A hook can call an MCP tool directly — the hook type is mcp_tool — and then it speaks every time.
If the hook above is all you need, you’re set: it costs nothing and sends nothing anywhere. The rest of this page is for when you’d rather not open the terminal at all — you say what you want done, and hear when it’s finished.
Sources: Claude Code documentation
Start it by voice, hear when it’s done
A hook tells you that Claude finished. DuoWave lets you skip the terminal at both ends.
DuoWave is a free, open-source assistant that runs on your computer. You press a button and say what you need. It starts a Claude Code session with that task, and when the session is over it tells you out loud:
- You: “Start a task in Claude Code: run the tests in the billing project and fix what fails.”
- DuoWave: “Started.”
- Later, DuoWave: “The task is finished: the tests in the billing project pass.”
Everything is in one place. You said what to do, walked away, and heard when it was done.
Sources: DuoWave, release 0.8.0
Ask how it’s going
While the task runs, you can ask:
- “How is the billing task going?”
and DuoWave answers in a voice.
DuoWave is not a replacement for Claude Code. You keep all of Claude Code’s power and change how you work with it: you look at results instead of a terminal, and you talk instead of typing.
Download DuoWave — it is free and open source.
When it goes wrong
Nothing is spoken. Type /hooks and check that your hook is listed. If it isn’t, the JSON is probably broken: a missing comma is enough. Then run the command by hand in a terminal — say 'test' — to see whether the voice itself works.
Several sessions talk at once. Every session runs the same hook. Give each project its own phrase by putting the hook in the project’s .claude/settings.json instead of the one in your home folder.
It talks at night. Wrap the command in a check of the hour, or keep the voice hook in the settings of the projects you run during the day.
It read something out that others shouldn’t hear. The summary script speaks whatever Claude wrote last. In a shared room, use the fixed phrase.
On Windows, nothing is spoken under WSL. powershell.exe must be reachable from WSL for the command to run.
Questions
Does Claude Code have built-in text-to-speech?
No. /voice is dictation: it turns your speech into the prompt. Spoken replies are not a feature of Claude Code; a hook is the way to get them.
Will the hook slow Claude down?
Not with "async": true. The command runs in the background.
Can I use a better voice?
On macOS, say -v '?' lists the voices you have and say -v Samantha '…' picks one. A cloud voice sounds better, but your text goes to that service.
Does anything leave my computer?
With the system voice, no: the text is spoken locally. With a cloud voice, the text you speak is sent to that service.
How do I turn it off?
Delete the hook block from the settings file, or remove it in /hooks.
Sources
Checked on 14 November 2026.
- DuoWave, release 0.8.0: changelog — talking through the computer’s microphone, long tasks of apps
- Claude Code documentation: Automate actions with hooks
- Claude Code documentation: Hooks reference — events, hook types, last_assistant_message, async
- Claude Code documentation: Voice dictation — what /voice does
DuoWave
One small program between your things and any AI
DuoWave is a free, open-source AI assistant. Say what you need — it builds small apps, automates your routine and reports back when it's done.
DuoWave is an independent project. It is not affiliated with or endorsed by any speaker maker or AI company. Product names belong to their owners.