Claude Code text to speech isn't built in: /voice turns speech into prompts but doesn't speak replies. Add a Stop hook that sends last_assistant_message to say on Mac, spd-say on Linux or PowerShell's speech synthesizer on Windows. Or use the free Readwalk for Mac, which reads replies aloud and listens for your spoken answer.
Does Claude Code have text to speech?
No. The voice dictation docs describe /voice as a way to speak your prompts. Your speech becomes text in the prompt input; Claude's answers aren't read aloud.
You can make Claude Code talk back with a hook you write or with Readwalk for Mac. For dictating prompts, see how to use Claude Code voice mode.
How do I add Claude Code text to speech with a hook?
A Stop hook runs when Claude finishes responding. It receives JSON on standard input, including last_assistant_message, the text of Claude's final response. Use that field for speech: the hooks reference says the transcript at transcript_path may still be missing the final message at Stop time on some versions.
New to hooks? Claude Code hooks explained covers where they go in settings.json and how to check that one fires.
On Mac:
- Install
jqif you don't have it:brew install jq. - Open
~/.claude/settings.json, creating it if needed. Add the block below. Keep your other settings; if you already have ahooksblock, add theStopentry there. If it already hasStophooks, append this hook to them. - Type
/hooksin Claude Code and check that your hook is listed under Stop. - Ask Claude something short and listen.
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "jq -r '.last_assistant_message // empty' | say",
"async": true
}
]
}
]
}
}
With "async": true, the command runs in the background. Claude Code doesn't wait for speech to finish.
For say, -v picks a voice and -r sets words per minute; say -v '?' lists voices. To read at 220 words per minute, use jq -r '.last_assistant_message // empty' | say -r 220.
This reads the whole message as written, code blocks and Markdown symbols included, so it suits short replies best.
If you only want a chime when a turn ends, see how to get a Claude Code notification sound when done.
How do I set it up on Linux or Windows?
On Linux, spd-say comes from the speech-dispatcher package. On Debian or Ubuntu, install it with sudo apt install speech-dispatcher and install jq with sudo apt-get install jq. Use the same Stop hook with this command:
spd-say "$(jq -r '.last_assistant_message // empty')"
When putting it in the JSON command value, escape the double quotes as \". The spd-say option -r sets the rate from -100 to +100.
On Windows, "shell": "powershell" runs a command hook in PowerShell. Claude Code uses pwsh.exe if it finds it, otherwise powershell.exe. Replace the command hook entry inside the same Stop block with:
{
"type": "command",
"shell": "powershell",
"async": true,
"command": "$m = ([Console]::In.ReadToEnd() | ConvertFrom-Json).last_assistant_message; if ($m) { $m | powershell.exe -NoProfile -Command 'Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak([Console]::In.ReadToEnd())' }"
}
The inner powershell.exe is Windows PowerShell 5.1, where System.Speech is available. Its SpeechSynthesizer.Speak method speaks a string. Test the command directly in PowerShell before relying on it, as the Claude Code hooks guide advises for Windows hooks.
For a hook under WSL to call powershell.exe, it must be on your PATH through Windows interop; voice dictation separately needs WSLg.
What does Readwalk add over a say hook?
| Feature | Stop hook with say |
Readwalk for Mac |
|---|---|---|
| Reads Claude's messages | Yes, the whole final message | Yes, skipping tool calls and tool output |
| Different voice per session | Only if you script it | Yes; change each voice in Claude Sessions › Voices |
| Listens for your answer | No | Plays a chime, listens with Apple's on-device speech recognition and sends your answer to that session |
| Several sessions | Each hook speaks whenever its session stops | One session speaks at a time; other switched-on sessions give a one-line headline and say "There's more: say read the rest." |
| Talks over other audio | Never talks over a reading you started; doesn't listen while reading | |
| Cost and platforms | Free; say on Mac, the alternatives above on Linux and Windows |
Free; macOS 15 or later, Apple silicon |
A hook is enough if you want to hear the odd reply. Readwalk suits a back-and-forth while your hands are busy. For the full walkthrough, see talk to Claude Code instead of typing.
If you want to run a whole session out loud, see how to code by voice.
How do I set up Readwalk to read Claude Code replies?
- Download Readwalk for Mac. It's free.
- In Readwalk's menu bar menu, choose Claude Sessions › Connect to Claude Code…. Readwalk saves the old settings as
~/.claude/settings.json.before-readwalk, then adds its hooks to~/.claude/settings.jsonstraight away. Your other hooks stay, including yoursayhook. Remove that hook so you don't hear replies twice. - Under Tell me when done, switch on the sessions you want to hear.
- Allow microphone and speech recognition when macOS asks.
Details are in Claude Code voice setup. For several sessions, see manage multiple Claude Code sessions by voice.
Can I hear Claude Code replies on my iPhone?
Yes, with Readwalk for iPhone 1.2 or later and the free Readwalk for Mac signed in to the same Apple ID. The iPhone app's Claude tab reads each session's reply aloud when it finishes and takes your answer by voice or typing. It works through your own iCloud and needs a Readwalk plan; the free trial counts.
To approve requests from your iPhone or reach a session with Remote Control, see how to control Claude Code from your phone.
Frequently asked questions
Does Claude Code have text to speech?
Not built in. /voice is dictation for your prompts. Add a Stop hook with say, or use Readwalk for Mac.
Can Claude Code talk back to me?
Yes, with a Stop hook that speaks last_assistant_message, or with Readwalk for Mac, which also listens for your spoken answer.
What's the best text to speech for Claude Code?
For the odd reply on Mac, start with a say hook. Readwalk for Mac suits a spoken back-and-forth and several sessions, with a voice per session. Both are free.
Can Claude Code read out loud in the terminal or CLI?
Yes. A Stop hook runs a shell command when Claude finishes, so it works in any terminal with the speech command set up for your OS. Readwalk's switching and typing need Apple's Terminal app.
Will the hook read code aloud?
Yes. The simple hook reads the whole final message, code and Markdown symbols included. Readwalk skips tool calls and tool output.