ElevenLabs text-to-speech CLI tool guide
Convert text to speech using ElevenLabs API with 42+ premium voices. Use when you need to synthesize audio for notifications, audiobooks, or content creation, and want to explore voices, manage quotas, or integrate TTS into workflows.
/plugin marketplace add dnvriend/elevenlabs-tts-tool/plugin install elevenlabs-tts-tool@elevenlabs-tts-toolThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Comprehensive guide for the elevenlabs-tts-tool CLI - a professional command-line interface for ElevenLabs text-to-speech synthesis. Provides both direct audio playback and file output with support for 42+ premium voices and multiple models.
Use this skill when:
Do NOT use this skill for:
Professional text-to-speech CLI tool built with Python 3.13+, uv, and the ElevenLabs SDK.
# Clone repository
git clone https://github.com/dnvriend/elevenlabs-tts-tool.git
cd elevenlabs-tts-tool
# Install globally with uv
uv tool install .
# Verify installation
elevenlabs-tts-tool --version
export ELEVENLABS_API_KEY='your-api-key'# Set API key
export ELEVENLABS_API_KEY='your-api-key'
# Basic text-to-speech
elevenlabs-tts-tool synthesize "Hello world"
# Use different voice
elevenlabs-tts-tool synthesize "Hello" --voice adam
# Save to file
elevenlabs-tts-tool synthesize "Text" --output speech.mp3
Convert text to speech using ElevenLabs API. Supports direct playback or file output.
Usage:
elevenlabs-tts-tool synthesize [TEXT] [OPTIONS]
Arguments:
TEXT: Text to synthesize (optional if --stdin used)--stdin, -s: Read text from stdin instead of argument--voice, -v NAME: Voice name or ID (default: rachel)--model, -m ID: Model ID (default: eleven_turbo_v2_5)--output, -o PATH: Save to audio file instead of playing--format, -f FORMAT: Output format (default: mp3_44100_128)Examples:
# Basic usage - play through speakers
elevenlabs-tts-tool synthesize "Hello world"
# Use different voice
elevenlabs-tts-tool synthesize "Hello" --voice adam
# Use specific model
elevenlabs-tts-tool synthesize "Hello" --model eleven_multilingual_v2
# Emotional expression (requires eleven_v3 model)
elevenlabs-tts-tool synthesize "[happy] Welcome to our service!" --model eleven_v3
# Multiple emotions
elevenlabs-tts-tool synthesize "[excited] Great news! [cheerfully] Your project is approved!" --model eleven_v3
# Add pauses with SSML
elevenlabs-tts-tool synthesize "Point one <break time=\"0.5s\" /> Point two <break time=\"0.5s\" /> Point three."
# Read from stdin
echo "Text from pipeline" | elevenlabs-tts-tool synthesize --stdin
# Save to file
elevenlabs-tts-tool synthesize "Text" --output speech.mp3
# Pipeline integration
cat document.txt | elevenlabs-tts-tool synthesize --stdin --output audiobook.mp3
Output: Plays audio through default speakers or saves to specified file format.
Available Formats:
mp3_44100_128 (default): MP3, 44.1kHz, 128kbpsmp3_44100_64: MP3, 44.1kHz, 64kbpsmp3_22050_32: MP3, 22.05kHz, 32kbpspcm_44100: PCM WAV, 44.1kHz (requires Pro tier)List all available ElevenLabs voices with characteristics.
Usage:
elevenlabs-tts-tool list-voices
Examples:
# List all voices
elevenlabs-tts-tool list-voices
# Filter by gender
elevenlabs-tts-tool list-voices | grep female
elevenlabs-tts-tool list-voices | grep male
# Filter by accent
elevenlabs-tts-tool list-voices | grep British
elevenlabs-tts-tool list-voices | grep American
# Filter by age
elevenlabs-tts-tool list-voices | grep young
elevenlabs-tts-tool list-voices | grep middle_aged
# Combine filters
elevenlabs-tts-tool list-voices | grep "female.*young.*British"
Output:
Voice Gender Age Accent Description
====================================================================================================
rachel female young American Calm and friendly American voice...
adam male middle_aged American Deep, authoritative American male...
charlotte female middle_aged British Smooth, professional British voice...
...
====================================================================================================
Total: 42 voices available
Popular Voices:
List all available ElevenLabs TTS models with characteristics and use cases.
Usage:
elevenlabs-tts-tool list-models
Examples:
# List all models
elevenlabs-tts-tool list-models
# Filter by status
elevenlabs-tts-tool list-models | grep stable
elevenlabs-tts-tool list-models | grep deprecated
# Find low-latency models
elevenlabs-tts-tool list-models | grep -i "ultra-low"
# Find multilingual models
elevenlabs-tts-tool list-models | grep -i "multilingual"
Output: Comprehensive model information including:
Key Models:
Cost Multipliers:
Display subscription tier, character usage, quota limits, and historical usage.
Usage:
elevenlabs-tts-tool info [--days N]
Arguments:
--days, -d N: Number of days of historical usage to display (default: 7)Examples:
# View subscription with last 7 days of usage
elevenlabs-tts-tool info
# View last 30 days of usage
elevenlabs-tts-tool info --days 30
# Quick quota check (1 day)
elevenlabs-tts-tool info --days 1
# Check usage before long generation
elevenlabs-tts-tool info --days 1 && elevenlabs-tts-tool synthesize "Long text..."
Output Information:
Use Cases:
Fetch latest voices from ElevenLabs API and update local lookup table.
Usage:
elevenlabs-tts-tool update-voices [--output PATH]
Arguments:
--output, -o PATH: Output file path (default: ~/.config/elevenlabs-tts-tool/voices_lookup.json)Examples:
# Update default voice lookup (user config directory)
elevenlabs-tts-tool update-voices
# Save to custom location
elevenlabs-tts-tool update-voices --output custom_voices.json
# Update before listing voices
elevenlabs-tts-tool update-voices && elevenlabs-tts-tool list-voices
Behavior:
~/.config/elevenlabs-tts-tool/)Display ElevenLabs pricing tiers and feature comparison.
Usage:
elevenlabs-tts-tool pricing
Examples:
# View full pricing table
elevenlabs-tts-tool pricing
# Find specific tier information
elevenlabs-tts-tool pricing | grep Creator
elevenlabs-tts-tool pricing | grep "44.1kHz PCM"
Output Information:
Key Insights:
Generate shell completion scripts for bash, zsh, or fish.
Usage:
elevenlabs-tts-tool completion [bash|zsh|fish]
Installation:
# Bash (add to ~/.bashrc)
eval "$(elevenlabs-tts-tool completion bash)"
# Zsh (add to ~/.zshrc)
eval "$(elevenlabs-tts-tool completion zsh)"
# Fish (save to completion file)
elevenlabs-tts-tool completion fish > ~/.config/fish/completions/elevenlabs-tts-tool.fish
Features:
ElevenLabs v3 model (eleven_v3) supports Audio Tags for emotional expression.
Available Emotion Tags:
[happy], [excited], [sad], [angry], [nervous], [curious][cheerfully], [playfully], [mischievously], [resigned tone], [flatly], [deadpan][whispers], [laughs], [gasps], [sighs], [pauses], [hesitates], [stammers], [gulps]Usage Examples:
# Basic emotion (requires eleven_v3 model)
elevenlabs-tts-tool synthesize "[happy] Welcome to our service!" --model eleven_v3
# Multiple emotions in sequence
elevenlabs-tts-tool synthesize "[excited] Great news! [cheerfully] Your project is approved!" --model eleven_v3
# Combine emotions with pauses
elevenlabs-tts-tool synthesize "[happy] Hello! <break time=\"0.5s\" /> [curious] How are you today?" --model eleven_v3
# Whispered speech
elevenlabs-tts-tool synthesize "[whispers] This is a secret message." --model eleven_v3
# Playful delivery
elevenlabs-tts-tool synthesize "[playfully] Guess what I found!" --model eleven_v3
Best Practices:
Add natural pauses using SSML <break> tags.
Syntax:
<break time="X.Xs" />
Examples:
# 1-second pause
elevenlabs-tts-tool synthesize "Welcome <break time=\"1.0s\" /> to our service."
# Multiple pauses
elevenlabs-tts-tool synthesize "Point one <break time=\"0.5s\" /> Point two <break time=\"0.5s\" /> Point three."
# Short pause for emphasis
elevenlabs-tts-tool synthesize "Think about this <break time=\"0.3s\" /> carefully."
# Combine with emotions (requires eleven_v3)
elevenlabs-tts-tool synthesize "[happy] Hello! <break time=\"0.5s\" /> [cheerfully] How are you?" --model eleven_v3
Limitations:
Alternative Methods:
- or —) for shorter pauses (less consistent)...) for hesitation (may add nervous tone)<break> is most reliableMulti-level verbosity for progressive detail control.
Verbosity Levels:
-v: INFO level - high-level operations, important events-vv: DEBUG level - detailed operations, API calls, validation steps-vvv: TRACE level - full HTTP requests/responses, ElevenLabs SDK internalsUsage:
# Quiet mode (warnings only)
elevenlabs-tts-tool synthesize "Hello world"
# INFO level
elevenlabs-tts-tool -v synthesize "Hello world"
# DEBUG level (detailed operations)
elevenlabs-tts-tool -vv synthesize "Hello world"
# TRACE level (shows HTTP requests/responses)
elevenlabs-tts-tool -vvv synthesize "Hello world"
Dependent Library Logging:
At trace level (-vvv), the following libraries enable DEBUG logging:
elevenlabs - ElevenLabs SDK internalshttpx / httpcore - HTTP request/response detailsurllib3 - Low-level HTTP operationsThe tool is designed for composition with other CLI tools.
Design Principles:
Examples:
# Read from file
cat document.txt | elevenlabs-tts-tool synthesize --stdin --output audio.mp3
# Combine with other tools
gemini-google-search-tool query "AI news" | \
elevenlabs-tts-tool synthesize --stdin --voice charlotte --output news.mp3
# Conditional execution
make build && elevenlabs-tts-tool synthesize "[cheerfully] Build successful!" || \
elevenlabs-tts-tool synthesize "[sad] Build failed. Check logs."
# Process multiple texts
for text in "First" "Second" "Third"; do
elevenlabs-tts-tool synthesize "$text" --output "${text}.mp3"
done
Use elevenlabs-tts-tool as notification system for Claude Code hooks.
Use Cases:
# After long-running task
elevenlabs-tts-tool synthesize "[excited] Task completed successfully!"
# On build failure
elevenlabs-tts-tool synthesize "[nervous] Error detected. Please check output."
# Shell script integration
make build && elevenlabs-tts-tool synthesize "[cheerfully] Build successful!" || \
elevenlabs-tts-tool synthesize "[sad] Build failed. Check logs."
# Combine with other CLI tools
gemini-google-search-tool query "AI news" | \
elevenlabs-tts-tool synthesize --stdin --voice charlotte --output news.mp3
Hook Configuration:
Create hooks in ~/.config/claude-code/hooks.json:
{
"hooks": {
"after_command": {
"type": "bash",
"command": "elevenlabs-tts-tool synthesize \"[happy] Task completed!\" --voice rachel"
},
"on_error": {
"type": "bash",
"command": "elevenlabs-tts-tool synthesize \"[nervous] Error occurred!\" --voice adam"
}
}
}
Benefits:
Issue: "API key not found" error
# Symptom
Error: ELEVENLABS_API_KEY environment variable not set
Solution:
export ELEVENLABS_API_KEY='your-api-key'
echo 'export ELEVENLABS_API_KEY="your-api-key"' >> ~/.bashrc
source ~/.bashrc
Issue: "Voice not found" error
# Symptom
ValueError: Voice 'unknown' not found in lookup table
Solution:
elevenlabs-tts-tool list-voices
elevenlabs-tts-tool update-voices
elevenlabs-tts-tool synthesize "Hello" --voice rachel
Issue: Character quota exceeded
# Symptom
Error: Character quota exceeded for this month
Solution:
elevenlabs-tts-tool info
elevenlabs-tts-tool pricing
Issue: Audio quality issues
Symptom: Poor audio quality or artifacts
Solution:
elevenlabs-tts-tool synthesize "Text" --format mp3_44100_128
elevenlabs-tts-tool synthesize "Text" --model eleven_multilingual_v2
elevenlabs-tts-tool synthesize "Text" --format pcm_44100
Issue: Emotional tags not working
Symptom: Emotion tags like [happy] are spoken literally
Solution:
elevenlabs-tts-tool synthesize "[happy] Text" --model eleven_v3
Issue: Too many SSML breaks causing issues
Symptom: Audio artifacts, speedup, or noise with multiple <break> tags
Solution:
elevenlabs-tts-tool synthesize "Part 1" --output part1.mp3
elevenlabs-tts-tool synthesize "Part 2" --output part2.mp3
# Main help
elevenlabs-tts-tool --help
# Command-specific help
elevenlabs-tts-tool synthesize --help
elevenlabs-tts-tool list-voices --help
elevenlabs-tts-tool info --help
# Version information
elevenlabs-tts-tool --version
Additional Resources:
ElevenLabs Free Tier (2024-2025):
<break>, phonemes)Upgrade Tiers:
Rate Limits: Not publicly documented - expect reasonable use restrictions on free tier
0: Success1: General error (validation, API error, etc.)Audio Formats:
mp3_44100_128: MP3, 44.1kHz, 128kbps (default, best quality)mp3_44100_64: MP3, 44.1kHz, 64kbps (good quality, smaller)mp3_22050_32: MP3, 22.05kHz, 32kbps (acceptable quality, smallest)pcm_44100: PCM WAV, 44.1kHz, uncompressed (requires Pro tier)Text Formats:
info command before large generationsupdate-voices monthly to get latest voices-vv or -vvv for debugging, default for production