Detalle del Skill
blog-audio
Genera narración en audio de entradas de blog usando Google Gemini TTS, con modos de resumen, lectura completa en voz alta y podcast de dos hablantes con 30 voces.
Necesita (declarado): API key
Revisar antes de usar
La revisión automática comprueba relevancia, no seguridad ni respaldo. Lee las instrucciones de la fuente antes de usar este Skill.
SKILL.md
Este extracto es una copia guardada durante la revisión. La fuente externa contiene la versión completa y actual.
---
name: blog-audio
description: >
Generate audio narration of blog posts using Google Gemini TTS.
Supports summary narration, full article read-aloud, and two-speaker
podcast/dialogue mode with 30 voice options. Outputs MP3 with HTML5
audio embed code. Works standalone via /blog audio or internally from
blog-write. Falls back gracefully when API key is not configured.
Use when user says "blog audio", "narrate blog", "audio version",
"text to speech", "tts", "podcast mode", "read aloud", "audio narration",
"voice", "narration", "generate audio".
user-invokable: true
argument-hint: "[generate|voices|setup] [file-or-text] [--mode summary|full|dialogue] [--voice name]"
license: MIT
metadata:
author: AgriciDaniel
version: "2.2.0"
---
# Blog Audio: Gemini TTS Narration for Blog Posts
Generate professional audio narration of blog content using Google's Gemini TTS.
Three modes: summary (200-300 word spoken overview), full article read-aloud,
or two-speaker podcast dialogue. 30 voices, 80+ languages, HTML5 embed output.
## Quick Reference
| Command | What it does |
|---------|-------------|
| `/blog audio generate <file>` | Generate audio narration of a blog post |
| `/blog audio voices` | Show available voices with characteristics |
| `/blog audio setup` | Check/configure API key for Gemini TTS |
## Prerequisites
- Python 3.11+ (venv managed automatically by `run.py`)
- `GOOGLE_AI_API_KEY` environment variable (same key used by blog-image)
- FFmpeg (for WAV-to-MP3 conversion; falls back to WAV if missing)
## Always Use run.py Wrapper
```bash
# CORRECT:
python3 scripts/run.py generate_audio.py --text "..." --voice Charon --json
# WRONG:
python3 scripts/generate_audio.py --text "..." # Fails without venv
```
## API Key Check (Gate Pattern)
Before generating audio, check for the API key:
```bash
test -n "${GOOGLE_AI_API_KEY:-}" && echo "GOOGLE_AI_API_KEY is set" || echo "GOOGLE_AI_API_KEY is not set"
```
- If set: proceed with generation
- If not set: guide the user:
"Audio generation requires a Google AI API key. Get one free at https://aistudio.google.com/apikey
Then set it: `export GOOGLE_AI_API_KEY=your-key`
This can be the same key used by `/blog image`, but it must be exported in the shell."
- **When called internally** (from blog-write): return silently if key is missing.
Never block the writing workflow.
## Setup
For `/blog audio setup`:
1. Check if `GOOGLE_AI_API_KEY` is set in environment
2. If blog-image uses project `.mcp.json`, confirm the referenced env var is exported
3. If not, guide user to https://aistudio.google.com/apikey
4. Verify with a dry run: `python3 scripts/run.py generate_audio.py --text "Test" --dry-run --json`
## Voice Selection
For `/blog audio voices`:
Load `references/voices.md` and present the voice catalog to the user.
Ask the user which voice they prefer, or recommend based on content type:
- **Article narration**: Charon (Informative) or Sadaltager (Knowledgeable)
- **Tutorial/how-to**: Achird (Friendly) or Sulafat (Warm)
- **News/analysis**: Rasalgethi (Informative) or Schedar (Even)
- **Lifestyle/wellness**: Aoede (Breezy) or Vindemiatrix (Gentle)
- **Dialogue host**: Puck (Upbeat) or Laomedeia (Upbeat)
- **Dialogue expert**: Kore (Firm) or Charon (Informative)
## Generation Workflow
For `/blog audio generate <file>`:
### Step 1: Read the Blog Post
Read the file and extract:
- Title (from H1 or frontmatter)
- Full content (markdown body)
- Approximate word count
### Step 2: Choose Mode
Ask the user (or auto-select if they specified `--mode`):
| Mode | When to use | Output |
|------|-------------|--------|
| **Summary** | Quick audio overview (1-2 min) | 200-300 word spoken summary |
| **Full** | Complete read-aloud (5-15 min) | Full article as natural speech |
| **Dialogue** | Podcast-style (3-8 min) | Two-person conversation about the article |
### Step 3: Prepare Text
Claude prepares the text; the script does TTS only.
**Summary mode:*Leer la fuente completa en GitHub (abre una página externa)