By centminmod
Text-to-speech for Claude Code using Kokoro-FastAPI with voice blending, streaming, and comprehensive format support
Manage TTS cache (stats, clear)
Export speech to audio file (WAV, MP3, FLAC, OPUS)
Start interactive TTS mode for conversational use
Show phoneme breakdown for text
Speak text using TTS with optional voice and format settings
Matches all tools
Hooks run on every tool call, not just specific ones
Executes bash commands
Hook triggers when Bash tool is used
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Modifies files
Hook triggers on file write and edit operations
Modifies files
Hook triggers on file write and edit operations
Runs pre-commands
Contains inline bash commands via ! syntax
Runs pre-commands
Contains inline bash commands via ! syntax
Text-to-speech integration for Claude Code using Kokoro-FastAPI with voice blending, streaming, and comprehensive format support.
| Directory | Contents | Purpose |
|---|---|---|
.claude-plugin/ | plugin.json | Plugin manifest |
commands/ | 8 markdown files | Slash command definitions |
hooks/ | hooks.json | Automatic TTS notifications on events |
scripts/ | 4 scripts | Python wrapper + notification scripts |
python/ | claude_tts.py + modules/ | TTS Python code (~7,500 lines) |
skills/ | SKILL.md | TTS notification skill |
Note: Plugin files are copied to Claude Code's plugin cache directory when installed. The original plugin directory is not modified.
| Location | Purpose | Size |
|---|---|---|
~/.claude_tts/cache/ | Audio cache (speeds up repeated phrases) | Up to 1GB |
~/.claude_tts/config.yml | User configuration file (optional) | <1KB |
~/.claude_tts/preload.json | Custom preload messages (optional) | <1KB |
These directories are created automatically on first use and persist across plugin updates.
Create a .claude_tts.yml file in your project root or ~/.claude_tts/config.yml to customize defaults:
# Server configuration
server:
url: http://localhost:8880
# Audio settings
audio:
voice: af_bella # af_bella, af_sky, am_adam, bf_emma, etc.
format: wav # wav, mp3, pcm, opus, flac
speed: 1.0 # 0.5 to 2.0
# Mode flags
notification: false # Optimized for Claude Code hooks
quiet: false # Suppress output
preload: true # Preload messages at startup
Precedence: CLI args > project .claude_tts.yml > user ~/.claude_tts/config.yml > hardcoded defaults
| Destination | Purpose | When |
|---|---|---|
localhost:8880 | Kokoro-FastAPI server | Every TTS request |
No external network calls - all TTS processing happens locally via your Docker container.
| Dependency | Install Command | Purpose |
|---|---|---|
| uv | curl -LsSf https://astral.sh/uv/install.sh | sh | Python package manager |
| Docker | docker.com | Runs Kokoro server |
| portaudio (optional) | brew install portaudio | Streaming audio |
These are installed automatically to an isolated environment when you first run a command:
requests>=2.31.0 - HTTP client for API callspygame>=2.5.0 - Audio playbackclick>=8.1.0 - CLI frameworkpython-dotenv>=1.0.0 - Environment configpydantic>=2.0.0 - Data validationpyaudio>=0.2.11 - Streaming audio (optional)pyyaml>=6.0 - YAML config (optional)# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# macOS (Homebrew)
brew install uv
docker run -d --restart unless-stopped --name kokoro -p 8880:8880 \
ghcr.io/remsky/kokoro-fastapi-cpu:latest
Verify it's running:
curl http://localhost:8880/health
Load the plugin directly for the current session:
claude --plugin-dir /path/to/claude-kokoro-tts
This loads the plugin without installation - useful for testing.
Use the /plugin command within Claude Code:
/plugin
Then browse, install, and enable the plugin interactively.
Add to your .claude/settings.json:
{
"enabledPlugins": {
"claude-kokoro-tts": true
}
}
Note: The enabledPlugins setting is always manual - it is not automatically set during installation. This method requires the plugin files to already be in Claude Code's plugin cache.
| Command | Example |
|---|---|
| Speak text | /claude-kokoro-tts:speak Hello world! |
| Voice blend | /claude-kokoro-tts:speak --voice af_bella+af_sky "Blended" |
| List voices | /claude-kokoro-tts:voices |
| Test setup | /claude-kokoro-tts:test |
| Export audio | /claude-kokoro-tts:export speech.mp3 "Save this" |
| Interactive mode | /claude-kokoro-tts:interactive |
| Phoneme analysis | /claude-kokoro-tts:phonemes "Hello" |
| Server stats | /claude-kokoro-tts:stats |
| Cache stats | /claude-kokoro-tts:cache stats |
| Clear cache | /claude-kokoro-tts:cache clear all |
Combine voices with + syntax:
af_bella+af_sky - Equal mixaf_bella(2)+af_sky(1) - 2:1 weighted ratioFor fast, non-blocking speech:
/claude-kokoro-tts:speak -n -b -q "Build complete"
npx claudepluginhub centminmod/claude-kokori-ttsPer-turn token, cost, and cache analytics for Claude Code sessions. Multi-format export (text/JSON/CSV/MD/HTML) with session blocks, weekly roll-up, subagent attribution, dynamic-workflow tracking, and 9-category turn waste classification. HTML reports include cost timeline, hour-of-day punchcard, model-switch dividers, cache-break badges, a per-turn detail drawer, and a per-request breakdown that groups turns by the prompt that drove them. Sibling skills: audit-session-metrics audits exports for waste patterns (summarisation-only — run on /model haiku for ~10× cheaper); task-breakdown groups requests into semantic tasks with worth-it / wasted verdicts and a Tasks companion page. Zero network, stdlib-only Python.
Local Kokoro TTS engine: MLX-Audio install, HTTP server, voice synthesis, health checks, diagnostics (Apple Silicon)
Voice-first interaction with automatic TTS markers for Claude Code
Text-to-speech skill providing voice synthesis capabilities for content generation.
Ultra-compressed communication mode. Cuts 65% of output tokens (measured) while keeping full technical accuracy by speaking like a caveman.
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Memory compression system for Claude Code - persist context across sessions