| name | setup |
| description | Configure claude-speak TTS - set up API key, choose voices, test playback, fix PATH issues, and manage settings |
| disable-model-invocation | true |
Claude-Speak Setup Helper
Help the user configure voice feedback for Claude Code.
First: Check Current Status
echo "=== claude-speak Status ==="
echo ""
if [ -f "$HOME/.local/bin/speak" ]; then
version=$("$HOME/.local/bin/speak" --version 2>/dev/null || echo "unknown")
echo "โ Binary installed: ~/.local/bin/speak (v$version)"
else
echo "โ Binary not found at ~/.local/bin/speak"
fi
if command -v speak >/dev/null 2>&1; then
echo "โ speak command available in PATH"
echo " Location: $(which speak)"
else
echo "โ speak command NOT in PATH"
fi
if [ -n "$ELEVENLABS_API_KEY" ]; then
echo "โ ELEVENLABS_API_KEY is set"
else
echo "โ ELEVENLABS_API_KEY is not set"
fi
if [ -f ~/.claude/tts/worker.pid ]; then
pid=$(cat ~/.claude/tts/worker.pid)
if kill -0 "$pid" 2>/dev/null; then
echo "โ Worker daemon running (PID: $pid)"
else
echo "โ ๏ธ Stale PID file (daemon not running)"
fi
else
echo "โน๏ธ No worker running (starts automatically on first speak command)"
fi
Based on the status, proceed with the relevant section below.
Fix PATH Issues
If speak is installed but not in PATH, fix it based on your platform:
Linux / macOS
Check if ~/.local/bin is in your PATH:
echo "$PATH" | grep -q "$HOME/.local/bin" && echo "โ ~/.local/bin is in PATH" || echo "โ ~/.local/bin NOT in PATH"
If not in PATH, add it to your shell profile:
Bash:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Fish:
fish_add_path ~/.local/bin
Windows
On Windows, the binary is at %USERPROFILE%\.local\bin\speak.exe. Add this directory to your user PATH:
PowerShell (run as Administrator):
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = "$env:USERPROFILE\.local\bin"
if ($userPath -notlike "*$newPath*") {
[Environment]::SetEnvironmentVariable("Path", "$userPath;$newPath", "User")
Write-Host "Added to PATH. Restart your terminal."
}
Or via GUI:
- Search for "Environment Variables" in Start menu
- Click "Edit environment variables for your account"
- Select "Path" โ "Edit"
- Click "New" โ Add
%USERPROFILE%\.local\bin
- Click OK, restart terminal
After fixing PATH, verify:
speak --version
API Key Setup
Step 1: Get an API key
- Go to elevenlabs.io and create an account (free tier available)
- Click profile icon (bottom-left) โ API Keys
- Click Create API Key โ enable all permissions (especially
voices_read for listing voices)
- Copy the API key
Step 2: Store API key securely
Recommended: Claude Code settings (never committed to git)
if [ -f .claude/settings.local.json ]; then
SETTINGS_FILE=".claude/settings.local.json"
elif [ -f ~/.claude/settings.json ]; then
SETTINGS_FILE="$HOME/.claude/settings.json"
else
mkdir -p .claude
SETTINGS_FILE=".claude/settings.local.json"
echo '{}' > "$SETTINGS_FILE"
fi
echo "Using settings file: $SETTINGS_FILE"
jq '.env.ELEVENLABS_API_KEY = "sk-your-api-key-here"' "$SETTINGS_FILE" > "$SETTINGS_FILE.tmp" && mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
echo "โ API key added to $SETTINGS_FILE"
Ensure .gitignore protects it:
if [ "$SETTINGS_FILE" = ".claude/settings.local.json" ]; then
if git check-ignore -q .claude/settings.local.json 2>/dev/null; then
echo "โ .claude/settings.local.json is already in .gitignore"
else
echo "โ ๏ธ Adding .claude/settings.local.json to .gitignore"
if [ -f .gitignore ]; then
if ! grep -q "\.claude/settings\.local\.json" .gitignore; then
echo ".claude/settings.local.json" >> .gitignore
echo "โ Added to .gitignore"
fi
else
echo ".claude/settings.local.json" > .gitignore
echo "โ Created .gitignore"
fi
fi
fi
Alternative: Shell profile (simpler but less secure)
echo 'export ELEVENLABS_API_KEY="sk-your-api-key-here"' >> ~/.bashrc
source ~/.bashrc
On Windows PowerShell:
[Environment]::SetEnvironmentVariable("ELEVENLABS_API_KEY", "sk-your-api-key-here", "User")
Step 3: Validate API key
Test the API key works:
curl -s "https://api.elevenlabs.io/v1/voices" \
-H "xi-api-key: $ELEVENLABS_API_KEY" | \
python3 -c 'import json,sys; d=json.load(sys.stdin); print("โ API key valid - found", len(d.get("voices", [])), "voices") if "voices" in d else print("โ Error:", d.get("detail", {}).get("message", "Unknown error"))'
Voice Selection
List all available voices
curl -s "https://api.elevenlabs.io/v1/voices" \
-H "xi-api-key: $ELEVENLABS_API_KEY" | \
python3 << 'PYEOF'
import json, sys
data = json.load(sys.stdin)
print(f"{'ID':<26} {'Name':<45} {'Gender':<10} {'Age':<15} {'Accent'}")
print("-" * 110)
for v in data["voices"]:
labels = v.get("labels", {})
name = v["name"]
vid = v["voice_id"]
gender = labels.get("gender", "")
age = labels.get("age", "")
accent = labels.get("accent", "")
print(f"{vid:<26} {name:<45} {gender:<10} {age:<15} {accent}")
PYEOF
Or browse voices in your browser: https://elevenlabs.io/voice-library
Test a voice
ELEVENLABS_VOICE_ID="IKne3meq5aSn9XLyUdCD" speak "Hello, this is a voice test"
Test multiple voices to compare:
for vid in "IKne3meq5aSn9XLyUdCD" "cjVigY5qzO86Huf0OWal" "nPczCjzI2devNBz1zQrb"; do
echo "Testing voice: $vid"
ELEVENLABS_VOICE_ID="$vid" speak "This is a voice preview. Testing the sound quality."
sleep 8
done
Set preferred voice permanently
In Claude Code settings:
jq '.env.ELEVENLABS_VOICE_ID = "IKne3meq5aSn9XLyUdCD"' "$SETTINGS_FILE" > "$SETTINGS_FILE.tmp" && mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
echo "โ Voice ID saved to $SETTINGS_FILE"
Or in shell profile:
echo 'export ELEVENLABS_VOICE_ID="IKne3meq5aSn9XLyUdCD"' >> ~/.bashrc
source ~/.bashrc
Optional Configuration
Change TTS model
jq '.env.ELEVENLABS_MODEL = "eleven_multilingual_v2"' "$SETTINGS_FILE" > "$SETTINGS_FILE.tmp" && mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
Troubleshooting
Binary won't execute
Check file permissions:
ls -la ~/.local/bin/speak
chmod +x ~/.local/bin/speak
Download failed
Manual download:
curl -fsSL "https://github.com/dkmaker/claude-speak/releases/download/v{VERSION}/speak-{PLATFORM}" \
-o ~/.local/bin/speak
chmod +x ~/.local/bin/speak
Example for Linux:
curl -fsSL "https://github.com/dkmaker/claude-speak/releases/download/v1.0.0/speak-linux-amd64" \
-o ~/.local/bin/speak
chmod +x ~/.local/bin/speak
Check daemon logs
tail -50 ~/.claude/tts/speak.log
Restart daemon
speak --stop
speak "Test message"
Test basic playback
speak "Testing one two three"
If you hear audio, it's working. If not:
- Check API key is valid
- Check you have internet connection
- Check daemon logs at
~/.claude/tts/speak.log
- On Linux: verify audio device works (
paplay /usr/share/sounds/alsa/Front_Center.wav)
Quick Setup Checklist
Run through this if setting up from scratch:
- โ Binary installed (
~/.local/bin/speak --version)
- โ Binary in PATH (
which speak)
- โ API key obtained (elevenlabs.io)
- โ API key stored (settings.json or shell profile)
- โ API key validated (curl test above)
- โ Voice selected and tested
- โ Test playback works (
speak "hello")