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
Metadata
Release files for claude-tts-hook 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| claude_tts_hook-0.4.0.tar.gz | 12.2 kB | Without provenance | Details for claude_tts_hook-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| claude_tts_hook-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for claude_tts_hook-0.4.0-py3-none-any.whl |
Total release size: 28.5 kB
Release files / claude_tts_hook-0.4.0.tar.gz
| Download URL | claude_tts_hook-0.4.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1a669586ae08410a20e6c6a06c9d9644751785ac9a37d9027c7efff89795192
|
|
BLAKE2b-256 checksum How to use checksums |
a7a9fa2121ebcb0802f24243b857584816998d69033c3c6f26f0961749c715b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / claude_tts_hook-0.4.0-py3-none-any.whl
| Download URL | claude_tts_hook-0.4.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77ec8b970439d264830d0584bac009cd8bd1eab2051f238680cf9890fc351a23
|
|
BLAKE2b-256 checksum How to use checksums |
938b28ee8b1169bb587e91822b1d2e401244ef4f8afc580cc41f8536c6f0b1e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for claude-tts-hook 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.