agentleFS
sonichisonichi/sutando/skills/gemini-tts/SKILL.md

gemini-tts

Skill396 starsChanged 6 months agoMITView on GitHub

Render text to mp3 via Google Gemini Flash TTS. Free-tier eligible (1500 req/day). Use for video narration, demo voiceovers, audio notes. Parallels openai-tts; default for make-viral-video.

  • Reads credentials

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default: gemini-2.5-flash-preview-tts (free tier, 1500 req/day, $0 within quota).

    line 31
  2. Very specific:

    Default output path: results/gemini-tts-{epoch}.mp3.

    line 46
  3. Distinctive:

    If ARGUMENTS is empty, ask the user for the text.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gemini TTS

Synthesize speech via Google's gemini-2.5-flash-preview-tts (or -pro-tts / -lite-preview-tts per env override). Reads GEMINI_API_KEY from .env.

This is offline synthesis — distinct from voice-agent's bidirectional Gemini Live audio. Same model family, different surface (POST text → get audio bytes back, no streaming).

Usage: /gemini-tts [text]

ARGUMENTS: $ARGUMENTS

Voices

Aoede (default — alto, neutral), Charon (baritone, news-anchor), Kore (mid, expressive), Puck (high, conversational). Per Lucy's 2026-05-09 testing: Aoede is the closest match to OpenAI's sage.

Audio tags for expression

Inline bracket tags like [whispers], [excitedly], [slowly] are interpreted as stylistic direction, not spoken literally. Empirically verified against gemini-2.5-flash-preview-tts (per PR #646 comment): [whispers] hello → 1.05s audio; hello alone → 1.01s. If the tag were spoken literally as 8 words, the clip would be ~5× longer.

bash "$SKILL_DIR/scripts/synthesize.sh" -- "[whispers] Pull request 691 has landed."

Model selection

Default: gemini-2.5-flash-preview-tts (free tier, 1500 req/day, $0 within quota).

Override via GEMINI_TTS_MODEL env var:

  • gemini-2.5-pro-tts — paid, higher fidelity
  • gemini-2.5-flash-lite-preview-tts — preview, faster
  • gemini-3.1-flash-tts-preview — preview

Examples

bash "$SKILL_DIR/scripts/synthesize.sh" -- "Hello, this is Sutando."
bash "$SKILL_DIR/scripts/synthesize.sh" --voice Charon --out /tmp/intro.mp3 -- "Hi."
GEMINI_TTS_MODEL=gemini-2.5-pro-tts bash "$SKILL_DIR/scripts/synthesize.sh" -- "High-fidelity narration."

Default output path: results/gemini-tts-{epoch}.mp3.

Cost

Free tier: $0 within 1500 req/day quota. For our cadence (a few demos a day), stays free indefinitely. Paid (Flash): $0.50 / 1M input tokens + $10.00 / 1M output tokens.

Compared to OpenAI TTS (gpt-4o-mini-tts) at ~$0.02 per 60s: Gemini Flash is free-equivalent for typical demo workloads.

When to fall back to openai-tts

The make-viral-video skill auto-falls-back to OpenAI TTS when:

  • Gemini API returns 4xx/5xx
  • Gemini quota hit (429)
  • GEMINI_API_KEY missing
  • TTS_PROVIDER=OPENAI env override set

If Invoked As A Slash Command

If ARGUMENTS is empty, ask the user for the text. Otherwise:

bash "$SKILL_DIR/scripts/synthesize.sh" -- "$ARGUMENTS"

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.