Claude Code hook that reads assistant messages aloud via a local TTS engine
Project description
claude-tts-hook
Claude Code hook that reads assistant messages aloud via a local TTS engine.
Features
- Plugs into Claude Code's
MessageDisplayhook — no polling, no transcript parsing needed - Splits long responses into chunks and speaks them sequentially
- Cleans Markdown before speaking (strips code blocks, headings, links, etc.)
- Converts English words / camelCase identifiers to katakana for natural Japanese TTS
- Multi-backend: drop in your preferred local TTS engine
Supported backends
| Backend | OS | Free | Notes |
|---|---|---|---|
| Voisona Talk | Win / Mac | ✓ | REST API on localhost:32766 |
| VoiceVox | Win / Mac / Linux | ✓ | REST API on localhost:50021 |
Installation
uv tool install claude-tts-hook
Or run without installing:
uvx claude-tts-hook --help
Setup
1. Create config
uvx claude-tts-hook init
This creates ~/.config/claude-tts-hook/config.json (Windows: %APPDATA%/claude-tts-hook/config.json). Edit it to set your backend and credentials:
{
"backend": "voisona",
"max_text_len": 500,
"debug": false,
"voisona": {
"language": "ja_JP",
"voice_name": null,
"voice_version": null,
"auth": "username:password",
"poll_interval": 0.5,
"poll_timeout": 60.0
},
"voicevox": {
"speaker_id": null
}
}
2. Pick a voice
uvx claude-tts-hook pick
3. Register as a Claude Code hook
uvx claude-tts-hook register
Or add manually to ~/.claude/settings.json:
{
"hooks": {
"MessageDisplay": [
{
"matcher": "",
"hooks": [{ "type": "command", "command": "uvx claude-tts-hook" }]
}
]
}
}
CLI
claude-tts-hook init [--force] # create default config
claude-tts-hook show # show config (password masked)
claude-tts-hook set KEY VALUE # update a config value
claude-tts-hook voices # list voices from the API
claude-tts-hook pick # interactive voice picker
claude-tts-hook register [--command …] # register as Claude Code hook
claude-tts-hook unregister [--command …] # remove hook registration
Setting config values
Top-level keys (backend, max_text_len, debug) are set directly:
claude-tts-hook set backend voicevox
claude-tts-hook set debug true
Backend-specific keys use backend.field notation:
claude-tts-hook set voisona.auth "user:pass"
claude-tts-hook set voicevox.speaker_id 1
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_tts_hook-0.3.0.tar.gz.
File metadata
- Download URL: claude_tts_hook-0.3.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
272232397c961acebcb14b25b4583d56706e6a028abfcdc84c61db1c2fa59931
|
|
| MD5 |
b4dd8bfacd4f0811931bf3bee3b68543
|
|
| BLAKE2b-256 |
386bcb23444ddbf5648b9c4e563fe02cd44050018bec132fe3876a0127967660
|
File details
Details for the file claude_tts_hook-0.3.0-py3-none-any.whl.
File metadata
- Download URL: claude_tts_hook-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45578935496dcbb22ae03a742e36012141ba8d4a2bb7ccadd3216d84ba5ee9dc
|
|
| MD5 |
5c9fc9db1790bc95a2979de9240a7e72
|
|
| BLAKE2b-256 |
ed4fe25bfcef186f254fce4f72866e021ba557a59b11932816bc3ee4660b5d90
|