Voice Notifications for Claude Code
I give Claude Code longer and longer tasks. Agents got smarter, so I can set a task, switch to something else, and come back later.
I set up a simple alarm with Claude Code hooks, shell commands that fire on lifecycle events, all calling the macOS say command:
Here’s my ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "say -v Zarvox \"Human, I'm done\"",
"async": true
}
]
}
],
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [
{
"type": "command",
"command": "say -v Zarvox 'Human, I need your permission'",
"async": true
}
]
},
{
"matcher": "elicitation_dialog",
"hooks": [
{
"type": "command",
"command": "say -v Zarvox 'Human, I need more information'",
"async": true
}
]
}
]
}
}
I use two notification matchers: permission_prompt and elicitation_dialog. I used to have an idle_prompt matcher, but I removed it quite fast. When you run multiple agents, after a while they all start complaining they’re bored.
Zarvox is the robotic voice. Run say -v '?' | grep en_US to see what’s available. Whisper specifically is a nice one, but scary as hell if you work late at night.
The "async": true flag tells Claude Code to fire the hook and keep working without waiting for say to finish. For a quick say command it barely matters, but without it Claude technically pauses until the command completes.
If you want something more sophisticated, you may try Peon Ping, a tool that solves the same problem with Warcraft III voice lines, desktop notifications, and a desktop orc tamagotchi. I tried it, appreciated the concept, but still, uninstalled it pretty quickly and replaced it with that say command.