gemini-tts-fast
Skill9 starsChanged 6 months agoApache-2.0View on GitHub
Convert text to speech with Google Gemini TTS API at fixed 1.2x playback speed and WAV output. Use when users need fast narration generation from English or Chinese text, with optional voice and output filename.
- Reads credentials
- Installs packages
In this repository18 other files it gives its agents.
- archive-card-writerSkill
- article-to-scriptSkill
- blogSkill
- blog-style-htmlSkill
- brainstormSkill
- compareSkill
- curated-content-writerSkill
- deep-diveSkill
- diff-storySkill
- explore-siteSkill
- learnSkill
- quizSkill
- resumeSkill
- screenshotSkill
- script-to-remotionSkill
- terminal-slide-deckSkill
- user-insight-researchSkill
- x-auto-engagementSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
When the user requests text-to-speech conversion, the skill will automatically apply 1.2x speed:
- Distinctive: line 35
Generate audio: Run the script to create the WAV file at 1.2x speed
- Very specific: line 58
Create a .env file with GOOGLE_API_KEY=your-key
- Very specific: line 60
Create a Python virtual environment: python -m venv venv
- Very specific: line 64
If GOOGLE_API_KEY is missing from .env, instruct user to add it
- Very specific: line 65
If ffmpeg is not installed, instruct user to install it (brew install ffmpeg)
- Distinctive: line 66
If script fails, show the error message
- Distinctive: line 67
If model is unavailable, suggest checking Gemini API status
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gemini Text-to-Speech Skill (1.2x Speed)
Convert text to speech using Google Gemini's TTS API with fixed 1.2x playback speed. Automatically generates standard WAV audio files optimized for video narration.
Features
- Converts text to natural-sounding speech using Gemini 2.5 Pro TTS
- Fixed 1.2x speed for more dynamic video narration
- Outputs standard WAV format (24kHz, 16-bit, mono)
- Supports multiple voice styles
- Handles both English and Chinese text
- Automatic format conversion using ffmpeg
Requirements
- Python 3.x with
google-genaipackage - ffmpeg (for audio format conversion)
GOOGLE_API_KEYenvironment variable (stored in.envfile)
Usage
When the user requests text-to-speech conversion, the skill will automatically apply 1.2x speed:
- Load environment: Source the
.envfile to get the API key - Parse arguments:
- Text to convert (required) - supports multiple languages
--output=filename.wav(optional, default: output.wav)--voice=VoiceName(optional, default: Puck)- Speed is automatically set to 1.2x (no need to specify)
- Generate audio: Run the script to create the WAV file at 1.2x speed
- Confirm success: Report the output file location and size
Available Voices
- Puck (default) - 中性、清晰 (Neutral, clear)
- Charon - 深沉、权威 (Deep, authoritative)
- Kore - 温暖、友好 (Warm, friendly)
- Fenrir - 强劲、动感 (Strong, dynamic)
- Aoede - 流畅、富有表现力 (Smooth, expressive)
Command Template
The skill now includes its own tts_cli.py script in the skill directory, making it fully portable:
set -a && source .env && set +a && \
source venv/bin/activate && \
python .claude/skills/gemini-tts-fast/tts_cli.py "<text>" --output="<filename>" --voice="<voice>" --speed=1.2Note: Users need to:
- Install Python dependencies:
pip install google-genai - Create a
.envfile withGOOGLE_API_KEY=your-key - Install ffmpeg:
brew install ffmpeg(macOS) or equivalent - Create a Python virtual environment:
python -m venv venv
Error Handling
- If
GOOGLE_API_KEYis missing from.env, instruct user to add it - If ffmpeg is not installed, instruct user to install it (
brew install ffmpeg) - If script fails, show the error message
- If model is unavailable, suggest checking Gemini API status
Examples
Simple usage (English):
/gemini-tts-fast "Hello world"→ Generates output.wav at 1.2x speed
With custom output:
/gemini-tts-fast "Welcome to our app" --output=welcome.wav→ Generates welcome.wav at 1.2x speed
With custom voice:
/gemini-tts-fast "Thank you for listening" --output=thanks.wav --voice=Aoede→ Generates thanks.wav at 1.2x speed with Aoede voice
Chinese text:
/gemini-tts-fast "你好世界" --output=hello_cn.wav --voice=Kore→ Generates hello_cn.wav at 1.2x speed with Kore voice
Processing script.json:
/gemini-tts-fast @script.json→ Automatically processes all narration scenes from script.json at 1.2x speed
Technical Details
- Input: Raw PCM data from Gemini API
- Processing: Converts to WAV and applies 1.2x speed using ffmpeg
atempofilter - Output format: RIFF WAVE, 24000 Hz, mono, 16-bit PCM
- Playback speed: Fixed at 1.2x (shortens duration by ~17%)
- Temporary files are automatically cleaned up
Why 1.2x Speed?
1.2x speed is optimal for video narration because:
- Maintains natural speech clarity
- Keeps the content engaging and dynamic
- Reduces video length without sounding rushed
- Standard practice for professional video voiceovers
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

