tts-generation

作成者: google-gemini

ラジオ番組の台本を音声に変換し、インタビュー相手の声に電話効果を適用する(Interactions APIを使用)。

npx skills add https://github.com/google-gemini/gemini-managed-agents-templates --skill tts-generation

TTS Generation

Convert the radio show script into speech audio using the Gemini TTS model via the Interactions API. Apply a telephone bandpass filter to correspondent voices so they sound like phone call-ins, while keeping the host's voice clean studio-quality.

Embedded Script

python3 skills/tts-generation/scripts/generate_tts.py --workspace ./workspace

Arguments

ArgumentDefaultDescription
--workspaceworkspaceRoot workspace directory
--workers8Max parallel TTS worker threads

What it does

  1. Reads the script from {workspace}/data/script.md.
  2. Parses it into individual (speaker, text) turns and assigns voices.
  3. Generates TTS for all turns in parallel using a thread pool (default 8 workers).
  4. Retries each failed turn up to 3 times with exponential backoff.
  5. Applies an ffmpeg telephone bandpass filter (300Hz–3.4kHz) to correspondent voices.
  6. Keeps the host (Paul) audio clean and unfiltered.
  7. Concatenates all segments in original script order into a single WAV.

Dependencies

  • google-genai (>= 2.0.0)
  • ffmpeg (system)

API Details

Uses the Interactions API with single-speaker TTS — no multi-speaker workaround needed.

Voice Assignment

Voices are assigned dynamically based on [Male] / [Female] gender tags in the script:

SpeakerVoiceAudio Treatment
Paul (host)PuckClean — no filter
Caller [Female] — 1stKoreTelephone filter
Caller [Female] — 2ndAoedeTelephone filter
Caller [Male] — 1stCharonTelephone filter
Caller [Male] — 2ndFenrirTelephone filter

Voices cycle round-robin if there are more callers than available voices. Accent tags ([Accent: Irish], etc.) are injected into the TTS prompt to influence pronunciation.

Telephone Filter

Applied via ffmpeg to correspondent audio segments:

highpass=f=300, lowpass=f=3400, acompressor, volume=1.5

This simulates the standard telephone bandwidth (300Hz–3.4kHz) and adds compression to mimic phone codec dynamics.

Output

  • Primary output: {workspace}/audio/speech/speech.wav
  • Format: WAV, 24kHz, 16-bit PCM, mono
  • Intermediate segments: {workspace}/audio/speech/segments/turn_*.wav

google-geminiのその他のスキル

greeter
google-gemini
フレンドリーな挨拶スキル
official
code-reviewer
google-gemini
ローカル変更とリモートプルリクエストに対する自動コードレビュー。正確性、保守性、セキュリティにわたる構造化分析を提供。ローカルファイルシステムの変更(ステージ済みおよび未ステージ)とリモートPR(番号またはURL指定)の両方をサポートし、GitHub CLIによる自動チェックアウトを実行。コードを正確性、保守性、可読性、効率性、セキュリティ、エッジケース処理、テストカバレッジの7つの観点で分析。オプションで事前検証スイート(例:npm run preflight)を実行し、問題を検出。
official
review-duplication
google-gemini
コードレビュー中にこのスキルを使用して、コードベース内の重複機能、車輪の再発明、既存の再利用の失敗などを積極的に調査します。
official
reconciliation
google-gemini
読み込まれた経費を事前解析済みの請求書データベースと照合し、金額の不一致、請求書の欠落、業者の不一致などの差異をフラグ付けします…
official
gemini-api-cli
google-gemini
Gemini API CLIツールの使用ガイド。コマンドラインからGemini APIとやり取りする必要がある場合、エージェントを管理する場合、またはメディア(画像など)を生成する場合に使用します。
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
async-pr-review
google-gemini
ユーザーが非同期PRレビューを開始したい、PRのバックグラウンドチェックを実行したい、または以前に開始した非同期PRのステータスを確認したい場合に、このスキルをトリガーしてください…
official
behavioral-evals
google-gemini
行動評価の作成、実行、修正、促進に関するガイダンス。エージェントの意思決定ロジックの検証、障害のデバッグ、プロンプトのデバッグなどに使用します。
official