$npx -y skills add AgriciDaniel/claude-blog --skill blog-audioGenerate 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-writ
| 1 | # Blog Audio: Gemini TTS Narration for Blog Posts |
| 2 | |
| 3 | Generate professional audio narration of blog content using Google's Gemini TTS. |
| 4 | Three modes: summary (200-300 word spoken overview), full article read-aloud, |
| 5 | or two-speaker podcast dialogue. 30 voices, 80+ languages, HTML5 embed output. |
| 6 | |
| 7 | ## Quick Reference |
| 8 | |
| 9 | | Command | What it does | |
| 10 | |---------|-------------| |
| 11 | | `/blog audio generate <file>` | Generate audio narration of a blog post | |
| 12 | | `/blog audio voices` | Show available voices with characteristics | |
| 13 | | `/blog audio setup` | Check/configure API key for Gemini TTS | |
| 14 | |
| 15 | ## Prerequisites |
| 16 | |
| 17 | - Python 3.11+ (venv managed automatically by `run.py`) |
| 18 | - `GOOGLE_AI_API_KEY` environment variable (same key used by blog-image) |
| 19 | - FFmpeg (for WAV-to-MP3 conversion; falls back to WAV if missing) |
| 20 | |
| 21 | ## Always Use run.py Wrapper |
| 22 | |
| 23 | ```bash |
| 24 | # CORRECT: |
| 25 | python3 scripts/run.py generate_audio.py --text "..." --voice Charon --json |
| 26 | |
| 27 | # WRONG: |
| 28 | python3 scripts/generate_audio.py --text "..." # Fails without venv |
| 29 | ``` |
| 30 | |
| 31 | ## API Key Check (Gate Pattern) |
| 32 | |
| 33 | Before generating audio, check for the API key: |
| 34 | |
| 35 | ```bash |
| 36 | echo $GOOGLE_AI_API_KEY |
| 37 | ``` |
| 38 | |
| 39 | - If set: proceed with generation |
| 40 | - If not set: guide the user: |
| 41 | "Audio generation requires a Google AI API key. Get one free at https://aistudio.google.com/apikey |
| 42 | Then set it: `export GOOGLE_AI_API_KEY=your-key` |
| 43 | This is the same key used by `/blog image`: if image generation works, audio works too." |
| 44 | - **When called internally** (from blog-write): return silently if key is missing. |
| 45 | Never block the writing workflow. |
| 46 | |
| 47 | ## Setup |
| 48 | |
| 49 | For `/blog audio setup`: |
| 50 | |
| 51 | 1. Check if `GOOGLE_AI_API_KEY` is set in environment |
| 52 | 2. If blog-image is configured (check `.mcp.json`), the key is already available |
| 53 | 3. If not, guide user to https://aistudio.google.com/apikey |
| 54 | 4. Verify with a dry run: `python3 scripts/run.py generate_audio.py --text "Test" --dry-run --json` |
| 55 | |
| 56 | ## Voice Selection |
| 57 | |
| 58 | For `/blog audio voices`: |
| 59 | |
| 60 | Load `references/voices.md` and present the voice catalog to the user. |
| 61 | |
| 62 | Ask the user which voice they prefer, or recommend based on content type: |
| 63 | - **Article narration**: Charon (Informative) or Sadaltager (Knowledgeable) |
| 64 | - **Tutorial/how-to**: Achird (Friendly) or Sulafat (Warm) |
| 65 | - **News/analysis**: Rasalgethi (Informative) or Schedar (Even) |
| 66 | - **Lifestyle/wellness**: Aoede (Breezy) or Vindemiatrix (Gentle) |
| 67 | - **Dialogue host**: Puck (Upbeat) or Laomedeia (Upbeat) |
| 68 | - **Dialogue expert**: Kore (Firm) or Charon (Informative) |
| 69 | |
| 70 | ## Generation Workflow |
| 71 | |
| 72 | For `/blog audio generate <file>`: |
| 73 | |
| 74 | ### Step 1: Read the Blog Post |
| 75 | |
| 76 | Read the file and extract: |
| 77 | - Title (from H1 or frontmatter) |
| 78 | - Full content (markdown body) |
| 79 | - Approximate word count |
| 80 | |
| 81 | ### Step 2: Choose Mode |
| 82 | |
| 83 | Ask the user (or auto-select if they specified `--mode`): |
| 84 | |
| 85 | | Mode | When to use | Output | |
| 86 | |------|-------------|--------| |
| 87 | | **Summary** | Quick audio overview (1-2 min) | 200-300 word spoken summary | |
| 88 | | **Full** | Complete read-aloud (5-15 min) | Full article as natural speech | |
| 89 | | **Dialogue** | Podcast-style (3-8 min) | Two-person conversation about the article | |
| 90 | |
| 91 | ### Step 3: Prepare Text |
| 92 | |
| 93 | **CRITICAL:** Claude prepares the text. The script does TTS only. |
| 94 | |
| 95 | **Summary mode:** |
| 96 | Write a 200-300 word spoken summary of the article. Rules: |
| 97 | - Write as natural speech, not written text |
| 98 | - Open with the article's key finding or answer |
| 99 | - Cover 3-5 main takeaways |
| 100 | - Close with actionable advice |
| 101 | - No markdown, no "In this article...", no meta-commentary |
| 102 | - Use conversational transitions ("Here's what matters...", "The key finding is...") |
| 103 | |
| 104 | **Full mode:** |
| 105 | Strip the markdown content to clean spoken text: |
| 106 | - Headings become natural transitions ("Next, let's look at...") |
| 107 | - Links become plain text (remove URLs, keep anchor text) |
| 108 | - Images and charts: omit or briefly describe ("As the data shows...") |
| 109 | - Code blocks: describe verbally ("The code uses a for-loop to...") |
| 110 | - Lists: convert to natural sentences |
| 111 | - Remove frontmatter, schema markup, HTML tags |
| 112 | - Add brief intro: "This is [title], published on [date]." |
| 113 | |
| 114 | **Dialogue mode:** |
| 115 | Write a 2-person conversation script about the article: |
| 116 | - Speaker1 = Host (curious, asks good questions) |
| 117 | - Speaker2 = Expert (knowledgeable, gives clear answers) |
| 118 | - Format each line as: `[Speaker1] What's the key takeaway here? |