Claude-voice: Local TTS with Word Highlighting for Claude Code

✍️ OpenClawRadar📅 Published: March 15, 2026🔗 Source
Claude-voice: Local TTS with Word Highlighting for Claude Code
Ad

What claude-voice does

Claude-voice adds text-to-speech functionality to Claude Code's /voice mode, which normally only accepts voice input but responds with silent text. This tool completes the loop by making Claude speak its responses aloud with real-time word highlighting.

Key features and implementation

The tool addresses limitations the developer found in existing options:

  • ElevenLabs free tier can't use voices via API (instant 402 error)
  • VoiceMode (893 stars on GitHub) is a 100+ file MCP server with DJ mode, sound fonts, and team connect features - more complex than needed
  • OpenAI TTS works but costs money and sends everything to their servers
  • None of the existing options had word-level highlighting - they all just play audio in the background

Claude-voice's specific features:

  • One Python file that installs as a Claude Code Stop hook
  • Uses Kokoro TTS (82M parameters, runs on CPU) - fully local, no API keys required
  • Real-time karaoke-style word highlighting with a sliding window and progress bar
  • Strips markdown, code blocks, and URLs before speaking
  • Fixes developer pronunciation (CLI, API, JSON, nginx, kubectl all spoken correctly)
  • Press any key to interrupt speech
  • 12 voices available (American/British, male/female)
  • claude-voice setup adds the hook automatically - no manual configuration needed
Ad

Performance and setup

Time to first audio is approximately 1 second warm, 6 seconds cold (model loading). The hardest implementation challenge was figuring out the /dev/tty trick for writing below Claude Code's renderer.

Installation commands:

pip install kokoro sounddevice numpy
git clone https://github.com/Null-Phnix/claude-voice
cd claude-voice
python speak.py setup
python speak.py demo

The demo video shows asking Claude about Loki's role as a trickster in Norse mythology using voice mode, with Claude responding and the TTS reading the full answer back with word highlighting running at the bottom of the terminal.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also