본문으로 건너뛰기
cccskills
무료GitHub에 공개

gemini-tts

Generate speech from text using Google Gemini TTS. Use when creating voiceovers, narration, podcasts, or any text-to-speech task. Supports 70+ languages, style/emotion control via natural language prompts, and 30 prebuilt voices. Trigger on "Gemini TTS", "Google TTS", "voiceover", "narration", "text to speech", "speech generation".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

memex-lab/product-launch-video-skill스타 26(GitHub 26 + cccskills 0)
연동 도구Gemini

실행 점수 미검증

설치 방법 보기

포함된 파일(3)

  • SKILL.md7.2 KB
  • references/prompting-guide.md4.9 KB
  • scripts/generate-tts.mjs17.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Gemini Text-to-Speech

Generate natural, expressive speech from text using Google Gemini TTS. Supports 70+ languages, 30 prebuilt voices, and style control via natural language prompts and audio tags.

Requirements: Node.js 18+, ffmpeg, @google/genai npm package, GEMINI_API_KEY env var.

Available Scripts

  • scripts/generate-tts.mjs — All-in-one TTS generator with single-request consistency, silence-based splitting, and automatic trimming.

Quick Start

Single text to speech

npm install @google/genai
GEMINI_API_KEY=your-key node scripts/generate-tts.mjs \
  --text "Hello, welcome to our product!" \
  --output-dir public/vo \
  --voice Kore

Multi-segment voiceover (consistent voice)

Create a segments.json:

[
  { "id": "intro", "text": "Welcome to our product launch." },
  { "id": "features", "text": "Here are the three features you will love." },
  { "id": "close", "text": "Get started today at our website." }
]

Run:

GEMINI_API_KEY=your-key node scripts/generate-tts.mjs \
  --segments segments.json \
  --output-dir public/vo \
  --voice Kore \
  --director-notes "Tone: Warm, confident, inspiring. Style: Professional narrator with a vocal smile. Accent: Neutral American English. Pacing: Moderate."

Output (JSON to stdout):

{
  "success": true,
  "segments": [
    { "id": "intro", "file": "public/vo/vo-intro.mp3", "duration": 3.25 },
    { "id": "features", "file": "public/vo/vo-features.mp3", "duration": 4.10 },
    { "id": "close", "file": "public/vo/vo-close.mp3", "duration": 2.80 }
  ],
  "totalDuration": 10.15,
  "fullAudioFile": "public/vo/vo-full.wav"
}

Script Options

FlagDefaultDescription
--segments FILE—JSON file with [{id, text}] segment definitions
--text TEXT—Single text to generate (alternative to --segments)
--output-dir DIR—Output directory for audio files (required)
--voice NAMEKorePrebuilt voice name (see Voices table)
--model NAMEgemini-3.1-flash-tts-previewGemini TTS model ID
--director-notes TEXT—Performance guidance: style, pacing, accent, breathing, articulation. Does not control gender/age (use --voice for that).
--retries N3Max retry attempts for API errors
--trim / --no-trim--trimTrim silence from segment boundaries
--format FORMATmp3Output format: mp3 or wav

Exit Codes

CodeMeaning
0Success
1Missing required arguments or env vars
2API error after retries exhausted
3ffmpeg not installed or processing failed
4File I/O error

How It Works (Multi-Segment)

Gemini TTS does NOT guarantee voice consistency across separate API requests. The script solves this by:

  1. Combining all segments into ONE prompt with [3 second pause] markers between them
  2. Generating a single continuous audio file in one API call
  3. Detecting silence gaps with ffmpeg silencedetect using adaptive thresholds (starts at noise=-35dB, d=1.5s, progressively relaxes). If an exact match is found, uses it directly. If a threshold jump occurs (too few → too many), regenerates audio with faster speech pacing to make inter-segment pauses more distinct, then retries detection.
  4. Splitting at silence midpoints into individual segment files
  5. Trimming residual silence padding (~1.5s per side) from each segment, keeping 0.15s breathing room

Models

ModelBest For
gemini-3.1-flash-tts-previewLatest, most controllable, 200+ audio tags (default)
gemini-2.5-flash-preview-ttsFast, good quality, general use
gemini-2.5-pro-preview-ttsHighest quality, complex performances

Voices

30 prebuilt voices:

VoiceGenderCharacterPitch
AchernarFemaleSoftHigher
AchirdMaleFriendlyLower middle
AlgenibMaleGravellyLower
AlgiebaMaleSmoothLower
AlnilamMaleFirmLower middle
AoedeFemaleBreezyMiddle
AutonoeFemaleBrightMiddle
CallirrhoeFemaleEasy-goingMiddle
CharonMaleInformativeLower
DespinaFemaleSmoothMiddle
EnceladusMaleBreathyLower
ErinomeFemaleClearMiddle
FenrirMaleExcitableLower middle
GacruxFemaleMatureMiddle
IapetusMaleClearLower middle
KoreFemaleFirmMiddle
LaomedeiaFemaleUpbeatHigher
LedaFemaleYouthfulHigher
OrusMaleFirmLower middle
PuckMaleUpbeatMiddle
PulcherrimaMaleForwardMiddle
RasalgethiMaleInformativeMiddle
SadachbiaMaleLivelyLower
SadaltagerMaleKnowledgeableMiddle
SchedarMaleEvenLower middle
SulafatFemaleWarmMiddle
UmbrielMaleEasy-goingLower middle
VindemiatrixFemaleGentleMiddle
ZephyrFemaleBrightHigher
ZubenelgenubiMaleCasualLower middle

Director's Notes (--director-notes)

Performance guidance for the selected voice. Define only what matters — overspecifying limits the model's creativity and can worsen results.

The three most common directions are Style, Pacing, and Accent, but you can include any custom instructions relevant to the performance.

  • Style — Emotional quality and delivery character. Be descriptive: "Infectious enthusiasm — the listener should feel part of something exciting" works better than just "energetic". You can layer characteristics and use voiceover industry terms like "vocal smile".
  • Pacing — Overall speed and rhythm variation. Can range from "Speak as fast as possible" to "Incredibly slow and liquid, words bleed into each other, zero urgency".
  • Accent — Be specific. "British English as heard in Croydon, England" works much better than "British accent".
--director-notes "Style: Enthusiastic and sassy GenZ beauty YouTuber. Pacing: Extremely fast, rapid delivery like short-form video influencers. Accent: Southern California valley girl from Laguna Beach."

Audio Tags

Inline [brackets] in segment text for per-word control. Override director-notes locally.

[whispers] [shouting] [excited] [serious] [short pause] [laughs] [very fast] [very slow] [sarcastic] [curious]

Creative tags work too: [like dracula], [whispering conspiratorially]

Example: "[excited] This changes everything! [short pause] Let me show you how."

References

  • Prompting Guide — Advanced prompt engineering for style, emotion, and accent

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Design and build spectacular, high-impact product launch videos using Remotion (React). Use this skill whenever the user wants to create a product launch video, promotional video, demo video, feature announcement video, brand reveal, or any motion-graphics-driven product showcase. Also trigger when the user mentions "launch video," "promo video," "product trailer," "product intro," "feature reveal," storyboarding for video, or wants to turn a product into a cinematic visual experience — even if they don't explicitly say "launch video."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

memex-lab/product-launch-video-skill262026년 6월 1일 업데이트

memex-lab의 스킬 모두 보기

이 스킬의 문제 신고