Voice Generation Skill
Generate realistic speech using AI (Google Gemini TTS, ElevenLabs, OpenAI TTS).
Prerequisites
At least one API key is required:
GOOGLE_API_KEY - For Google Gemini TTS (same key as video/image/music) ✅
ELEVENLABS_API_KEY - For ElevenLabs high-quality voice synthesis
OPENAI_API_KEY - For OpenAI TTS voices
Available APIs
Google Gemini TTS (Recommended - Same API Key)
- Best for: Podcasts, dialogues, audiobooks with style control
- Voices: 30 voices with natural language style control
- Multi-speaker: Up to 2 speakers for dialogues ✅
- Languages: 24 languages (auto-detected)
- Features: Control style, accent, pace via prompts
- Output: 24kHz WAV
- API Key: Same
GOOGLE_API_KEY as video/image/music ✅
ElevenLabs (Best Quality)
- Best for: Natural-sounding voices, voice cloning, long-form content
- Voices: 100+ pre-made voices + custom voice cloning
- Languages: 29+ languages
- Models: Eleven Multilingual v2, Eleven Turbo v2
OpenAI TTS (Simplest)
- Best for: Quick, reliable text-to-speech with consistent quality
- Voices: alloy, echo, fable, onyx, nova, shimmer
- Models: tts-1 (fast), tts-1-hd (high quality)
- Output: MP3, Opus, AAC, FLAC
Workflow
Step 1: Understand the Request
Parse the user's voice request for:
- Text content: What should be spoken?
- Voice type: Male, female, specific character?
- Tone: Professional, casual, dramatic, cheerful?
- Use case: Narration, voiceover, audiobook, notification?
- Language: English, Spanish, other?
- Speed: Normal, slow, fast?
Step 2: Select Voice and API
Choose based on requirements:
| Use Case |
Recommended API |
Reason |
| Default / Same key as video |
Gemini TTS |
Same GOOGLE_API_KEY ✅ |
| Multi-speaker dialogue |
Gemini TTS |
Up to 2 speakers built-in |
| Style/accent control |
Gemini TTS |
Natural language prompts |
| Voice cloning |
ElevenLabs |
Only API with cloning |
| 100+ voice options |
ElevenLabs |
Widest selection |
| Audiobook/podcast |
ElevenLabs or Gemini |
Both excellent for long content |
| Quick narration |
OpenAI TTS |
Fast, reliable |
| Budget-conscious |
OpenAI TTS |
Lower cost |
Step 3: Prepare the Text
Optimize text for speech:
- Add pauses: Use commas, periods for natural rhythm
- Spell out numbers: "1,234" → "one thousand two hundred thirty-four" (if needed)
- Handle acronyms: "NASA" vs "N.A.S.A." depending on pronunciation
- Mark emphasis: Some APIs support emphasis markers
Example transformation:
- Original: "The Q4 2024 results show a 15% YoY increase."
- Optimized: "The Q4 2024 results show a fifteen percent year-over-year increase."
Step 4: Generate the Audio
Execute the appropriate script from ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/:
For Google Gemini TTS (single speaker):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py \
--text "Welcome to our podcast!" \
--voice "Charon"
Gemini TTS with style direction:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py \
--text "Have a wonderful day!" \
--voice "Puck" \
--style "Say cheerfully with a British accent:"
Gemini TTS multi-speaker (dialogue):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py \
--multi \
--speaker "Host:Charon" \
--speaker "Guest:Aoede" \
--text "Host: Welcome to the show!
Guest: Thanks for having me!"
For ElevenLabs:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/elevenlabs.py \
--text "Your text here" \
--voice "Rachel" \
--model "eleven_multilingual_v2"
For OpenAI TTS:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/openai_tts.py \
--text "Your text here" \
--voice "nova" \
--model "tts-1-hd"
List Gemini voices:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py --list-voices
Step 5: Deliver the Result
- Provide the generated audio file path
- Mention the voice and settings used
- Offer to:
- Try a different voice
- Adjust speed or tone
- Use a different API
- Generate in a different format
Error Handling
Missing API key: Inform the user which key is needed:
Gemini TTS requires google-genai package: pip install google-genai
Text too long: Split into chunks and concatenate, or suggest shorter text.
Rate limit: Suggest waiting or trying a different API.
Unsupported language: Suggest an alternative API that supports the language.
Multi-speaker limit: Gemini TTS supports max 2 speakers. For more, use ElevenLabs with multiple calls.
Voice Selection Guide
Google Gemini TTS Voices (30 voices)
| Style |
Voices |
Best For |
| Bright/Upbeat |
Zephyr, Puck, Aoede, Laomedeia |
Marketing, cheerful content |
| Firm/Informative |
Charon, Kore, Orus, Rasalgethi |
News, tutorials, professional |
| Soft/Warm |
Achernar, Sulafat, Vindemiatrix |
Meditation, gentle narration |
| Smooth |
Algieba, Despina, Callirrhoe |
Audiobooks, storytelling |
| Clear |
Erinome, Iapetus, Pulcherrima |
Instructions, clarity |
| Character |
Fenrir (excitable), Enceladus (breathy), Algenib (gravelly), Gacrux (mature) |
Character voices, drama |
| Friendly |
Achird, Zubenelgenubi (casual) |
Casual, conversational |
Gemini TTS Style Tips:
- Use natural language:
--style "Say angrily:" or --style "Whisper mysteriously:"
- Specify accents:
--style "Speak with a British accent from London:"
- Control pace:
--style "Speak slowly and deliberately:"
- Combine:
--style "Say excitedly with a Southern US accent:"
OpenAI TTS Voices
| Voice |
Description |
Best For |
| alloy |
Neutral, balanced |
General purpose |
| echo |
Warm, conversational |
Podcasts, casual |
| fable |
Expressive, British |
Storytelling |
| onyx |
Deep, authoritative |
Narration, professional |
| nova |
Friendly, upbeat |
Marketing, tutorials |
| shimmer |
Soft, gentle |
Meditation, ASMR |
ElevenLabs Popular Voices
| Voice |
Description |
Best For |
| Rachel |
Young female, American |
Narration, audiobooks |
| Domi |
Young female, energetic |
Marketing, ads |
| Bella |
Young female, soft |
Storytelling |
| Antoni |
Young male, well-rounded |
Narration |
| Josh |
Young male, deep |
Audiobooks |
| Arnold |
Mature male, authoritative |
Documentary |
| Adam |
Middle-aged male, deep |
Narration |
| Sam |
Young male, raspy |
Character voices |
Best Practices
For Narration
- Use a consistent voice throughout
- Add natural pauses between paragraphs
- Consider pacing for the content type
For Dialogue
- Use different voices for different characters
- Match voice characteristics to character descriptions
- Adjust speed for emotional scenes
For Accessibility
- Use clear, well-paced speech
- Avoid overly stylized voices
- Test with screen readers if applicable
API Comparison
| Feature |
Gemini TTS |
ElevenLabs |
OpenAI TTS |
| API Key |
GOOGLE_API_KEY ✅ |
ELEVENLABS_API_KEY |
OPENAI_API_KEY |
| Voice quality |
Excellent |
Excellent |
Very good |
| Voice variety |
30 voices |
100+ voices |
6 voices |
| Multi-speaker |
✅ Up to 2 |
❌ No |
❌ No |
| Style control |
✅ Natural language |
Limited |
❌ No |
| Voice cloning |
❌ No |
✅ Yes |
❌ No |
| Languages |
24 |
29+ |
50+ |
| Speed control |
Via prompts |
Yes |
Yes (0.25-4x) |
| Max length |
32k tokens |
5,000 chars |
4,096 chars |
| Output format |
WAV (24kHz) |
MP3, WAV |
MP3, Opus, AAC, FLAC |
| Same key as video/image |
✅ Yes |
❌ No |
❌ No |
1---2name: voice-generation3description: Use this skill for AI text-to-speech generation. Triggers include: "generate voice", "create audio", "text to speech", "TTS", "read this aloud", "generate narration", "create voiceover", "synthesize speech", "podcast audio", "dialogue audio", "multi-speaker", "audiobook" Supports Google Gemini TTS, ElevenLabs, and OpenAI TTS.4---56# Voice Generation Skill78Generate realistic speech using AI (Google Gemini TTS, ElevenLabs, OpenAI TTS).910## Prerequisites1112At least one API key is required:1314- `GOOGLE_API_KEY` - For Google Gemini TTS (same key as video/image/music) ✅15- `ELEVENLABS_API_KEY` - For ElevenLabs high-quality voice synthesis16- `OPENAI_API_KEY` - For OpenAI TTS voices1718## Available APIs1920### Google Gemini TTS (Recommended - Same API Key)21- **Best for**: Podcasts, dialogues, audiobooks with style control22- **Voices**: 30 voices with natural language style control23- **Multi-speaker**: Up to 2 speakers for dialogues ✅24- **Languages**: 24 languages (auto-detected)25- **Features**: Control style, accent, pace via prompts26- **Output**: 24kHz WAV27- **API Key**: Same `GOOGLE_API_KEY` as video/image/music ✅2829### ElevenLabs (Best Quality)30- **Best for**: Natural-sounding voices, voice cloning, long-form content31- **Voices**: 100+ pre-made voices + custom voice cloning32- **Languages**: 29+ languages33- **Models**: Eleven Multilingual v2, Eleven Turbo v23435### OpenAI TTS (Simplest)36- **Best for**: Quick, reliable text-to-speech with consistent quality37- **Voices**: alloy, echo, fable, onyx, nova, shimmer38- **Models**: tts-1 (fast), tts-1-hd (high quality)39- **Output**: MP3, Opus, AAC, FLAC4041## Workflow4243### Step 1: Understand the Request4445Parse the user's voice request for:46- **Text content**: What should be spoken?47- **Voice type**: Male, female, specific character?48- **Tone**: Professional, casual, dramatic, cheerful?49- **Use case**: Narration, voiceover, audiobook, notification?50- **Language**: English, Spanish, other?51- **Speed**: Normal, slow, fast?5253### Step 2: Select Voice and API5455Choose based on requirements:5657| Use Case | Recommended API | Reason |58|----------|----------------|--------|59| **Default / Same key as video** | Gemini TTS | Same `GOOGLE_API_KEY` ✅ |60| **Multi-speaker dialogue** | Gemini TTS | Up to 2 speakers built-in |61| **Style/accent control** | Gemini TTS | Natural language prompts |62| **Voice cloning** | ElevenLabs | Only API with cloning |63| **100+ voice options** | ElevenLabs | Widest selection |64| **Audiobook/podcast** | ElevenLabs or Gemini | Both excellent for long content |65| **Quick narration** | OpenAI TTS | Fast, reliable |66| **Budget-conscious** | OpenAI TTS | Lower cost |6768### Step 3: Prepare the Text6970Optimize text for speech:71721. **Add pauses**: Use commas, periods for natural rhythm732. **Spell out numbers**: "1,234" → "one thousand two hundred thirty-four" (if needed)743. **Handle acronyms**: "NASA" vs "N.A.S.A." depending on pronunciation754. **Mark emphasis**: Some APIs support emphasis markers7677**Example transformation:**78- Original: "The Q4 2024 results show a 15% YoY increase."79- Optimized: "The Q4 2024 results show a fifteen percent year-over-year increase."8081### Step 4: Generate the Audio8283Execute the appropriate script from `${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/`:8485**For Google Gemini TTS (single speaker):**86```bash87python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py \88 --text "Welcome to our podcast!" \89 --voice "Charon"90```9192**Gemini TTS with style direction:**93```bash94python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py \95 --text "Have a wonderful day!" \96 --voice "Puck" \97 --style "Say cheerfully with a British accent:"98```99100**Gemini TTS multi-speaker (dialogue):**101```bash102python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py \103 --multi \104 --speaker "Host:Charon" \105 --speaker "Guest:Aoede" \106 --text "Host: Welcome to the show!107Guest: Thanks for having me!"108```109110**For ElevenLabs:**111```bash112python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/elevenlabs.py \113 --text "Your text here" \114 --voice "Rachel" \115 --model "eleven_multilingual_v2"116```117118**For OpenAI TTS:**119```bash120python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/openai_tts.py \121 --text "Your text here" \122 --voice "nova" \123 --model "tts-1-hd"124```125126**List Gemini voices:**127```bash128python3 ${CLAUDE_PLUGIN_ROOT}/skills/voice-generation/scripts/gemini_tts.py --list-voices129```130131### Step 5: Deliver the Result1321331. Provide the generated audio file path1342. Mention the voice and settings used1353. Offer to:136 - Try a different voice137 - Adjust speed or tone138 - Use a different API139 - Generate in a different format140141## Error Handling142143**Missing API key**: Inform the user which key is needed:144- Gemini TTS: Same `GOOGLE_API_KEY` as video/image - https://aistudio.google.com/apikey145- ElevenLabs: https://elevenlabs.io146- OpenAI: https://platform.openai.com/api-keys147148**Gemini TTS requires google-genai package**: `pip install google-genai`149150**Text too long**: Split into chunks and concatenate, or suggest shorter text.151152**Rate limit**: Suggest waiting or trying a different API.153154**Unsupported language**: Suggest an alternative API that supports the language.155156**Multi-speaker limit**: Gemini TTS supports max 2 speakers. For more, use ElevenLabs with multiple calls.157158## Voice Selection Guide159160### Google Gemini TTS Voices (30 voices)161| Style | Voices | Best For |162|-------|--------|----------|163| Bright/Upbeat | Zephyr, Puck, Aoede, Laomedeia | Marketing, cheerful content |164| Firm/Informative | Charon, Kore, Orus, Rasalgethi | News, tutorials, professional |165| Soft/Warm | Achernar, Sulafat, Vindemiatrix | Meditation, gentle narration |166| Smooth | Algieba, Despina, Callirrhoe | Audiobooks, storytelling |167| Clear | Erinome, Iapetus, Pulcherrima | Instructions, clarity |168| Character | Fenrir (excitable), Enceladus (breathy), Algenib (gravelly), Gacrux (mature) | Character voices, drama |169| Friendly | Achird, Zubenelgenubi (casual) | Casual, conversational |170171**Gemini TTS Style Tips:**172- Use natural language: `--style "Say angrily:"` or `--style "Whisper mysteriously:"`173- Specify accents: `--style "Speak with a British accent from London:"`174- Control pace: `--style "Speak slowly and deliberately:"`175- Combine: `--style "Say excitedly with a Southern US accent:"`176177### OpenAI TTS Voices178| Voice | Description | Best For |179|-------|-------------|----------|180| alloy | Neutral, balanced | General purpose |181| echo | Warm, conversational | Podcasts, casual |182| fable | Expressive, British | Storytelling |183| onyx | Deep, authoritative | Narration, professional |184| nova | Friendly, upbeat | Marketing, tutorials |185| shimmer | Soft, gentle | Meditation, ASMR |186187### ElevenLabs Popular Voices188| Voice | Description | Best For |189|-------|-------------|----------|190| Rachel | Young female, American | Narration, audiobooks |191| Domi | Young female, energetic | Marketing, ads |192| Bella | Young female, soft | Storytelling |193| Antoni | Young male, well-rounded | Narration |194| Josh | Young male, deep | Audiobooks |195| Arnold | Mature male, authoritative | Documentary |196| Adam | Middle-aged male, deep | Narration |197| Sam | Young male, raspy | Character voices |198199## Best Practices200201### For Narration202- Use a consistent voice throughout203- Add natural pauses between paragraphs204- Consider pacing for the content type205206### For Dialogue207- Use different voices for different characters208- Match voice characteristics to character descriptions209- Adjust speed for emotional scenes210211### For Accessibility212- Use clear, well-paced speech213- Avoid overly stylized voices214- Test with screen readers if applicable215216## API Comparison217218| Feature | Gemini TTS | ElevenLabs | OpenAI TTS |219|---------|------------|------------|------------|220| API Key | `GOOGLE_API_KEY` ✅ | `ELEVENLABS_API_KEY` | `OPENAI_API_KEY` |221| Voice quality | Excellent | Excellent | Very good |222| Voice variety | 30 voices | 100+ voices | 6 voices |223| Multi-speaker | ✅ Up to 2 | ❌ No | ❌ No |224| Style control | ✅ Natural language | Limited | ❌ No |225| Voice cloning | ❌ No | ✅ Yes | ❌ No |226| Languages | 24 | 29+ | 50+ |227| Speed control | Via prompts | Yes | Yes (0.25-4x) |228| Max length | 32k tokens | 5,000 chars | 4,096 chars |229| Output format | WAV (24kHz) | MP3, WAV | MP3, Opus, AAC, FLAC |230| Same key as video/image | ✅ Yes | ❌ No | ❌ No |