Speak agent responses aloud
agent-tts reads a completed Claude Code, Cursor, or Antigravity turn and speaks the useful part - without you watching the screen.
A Stop hook fires when the agent finishes. A local daemon reads the transcript, cleans the Markdown, and speaks it through your OS voice or a cloud provider. The hook itself stays fast and fail-open.
The hook never injects a follow-up into the chat. It prints {} and returns.
What gets spoken
Pick a mode, then look at the same Cursor/Claude turn on the left and the audio on the right.
First prose paragraph. Default. Often the “I’ll look at that” line.
Agent turn
Fix the Stop hook timeout
I'll check the Cursor adapter and the shared runner. Then I'll raise the timeout and add a test.
The stop hook currently times out at 10 seconds, which is enough to notify the daemon but not to wait on playback. I raised it in hosts/cursor/hooks.json and documented why.
Keep the hook fail-open. A TTS failure must never block the turn.
see codeblock below
The tests are green. Bind skip to a hotkey next.
What you hear
- prose
“I'll check the Cursor adapter and the shared runner. Then I'll raise the timeout and add a test.”
| Command | Speaks |
|---|---|
tts summary | First prose paragraph (default) |
tts closing | Last prose paragraph |
tts brief | First sentence of the lead paragraph |
tts full | Every cleaned block |
Headings and blockquotes use the header voice when you set one. Code blocks and tables become a short pointer (see codeblock below) instead of being read aloud. Turns that are only a pointer, or shorter than three words, stay silent.
See Choose what to speak for junk skipping and dual-voice rules.
Control without the model
Slash /tts still goes through the agent, so stop is slow. The tts binary talks to the daemon directly:
scripts/install-cli.sh # ~/.local/bin/tts
tts stop
tts skip
tts pause
tts resumeBind those to Raycast, a Shortcut, or any hotkey. See Control playback.