Skip to content

omarelkhal/aftertone

Aftertone

Aftertone — local text-to-speech for AI coding agents

Local speech after each agent reply — Supertonic ONNX on your machine, no cloud TTS API.
Free (MIT). Install once. Works across projects.

Buy me a coffee

Demo — Claude Code with /aftertone_on (short question + clone-a-repo). Unmute for audio.

demo.mp4

Hear the spoken summary when each reply finishes. For an embedded player on this page, edit README on github.com and drag docs/demo.mp4 onto a blank line — see README-video-embed.md.

Adapters

Cursor Claude Code Codex OpenCode
Status soon

Same tts_daemon for all — each adapter runs a hook when a reply finishes. Claude setup · Codex setup · Contributing

Install

Linux / macOS (needs git + bash):

curl -fsSL https://raw.githubusercontent.com/omarelkhal/aftertone/main/scripts/install.sh | bash -s -- --install-uv --start-daemon

Windows (PowerShell, needs Git for Windows):

irm https://raw.githubusercontent.com/omarelkhal/aftertone/main/scripts/install.ps1 | iex

Installs to ~/aftertone (or %USERPROFILE%\aftertone), downloads models, registers hooks, starts the daemon, enables TTS.

Then:

Tool You do
Cursor Settings → Hooks on · trust the workspace
Claude Code claude/aftertone_on in each chat where you want speech
Codex codex$aftertone-on or /skillsaftertone-on, then review/trust ~/.codex/hooks.json

Agents should end substantive replies with <spoken_summary>…</spoken_summary> (repo default: tag only — no tag, no speech). See spoken-summary rule.

More options, uninstall, manual clone: docs · scripts/

Control

Type / in Agent chat. Do not hand-edit TOML for everyday changes.

Per-session on/off

/aftertone-on and /aftertone-off (Claude: /aftertone_on / /aftertone_off, Codex: $aftertone-on / $aftertone-off) apply to this chat only. Run the on command in each Composer, Claude, or Codex session where you want speech; other sessions stay silent until you enable them there too. After turning it on, send any agent reply so the hook can register that session.

Cursor Claude Code Codex
/aftertone-on /aftertone-off /aftertone-toggle /aftertone_on /aftertone_off /aftertone_toggle $aftertone-on $aftertone-off
/aftertone-status /aftertone_status $aftertone-status
/aftertone-lang /aftertone-voice /aftertone-restart /aftertone_lang /aftertone_voice /aftertone_restart python -m aftertone set ... / restart
docs Claude guide Codex guide

Power-user: aftertone session list, aftertone session clear, aftertone global-off (mute everywhere).

CLI (same as slash commands):

cd "$(cat ~/.cursor/hooks/aftertone-install-dir)"
uv run --directory py python -m aftertone status

Troubleshooting

  • /aftertone-doctor or uv run --directory py python -m aftertone doctor
  • Logs: <install>/.cursor/hooks/state/speak_summary-hook.log
  • Windows: Cursor may delay hooks for seconds before Aftertone runs — details

Config reference: .cursor/hooks/README.md · Agent notes: AGENTS.md

Links