audio-mixing

Mix speech audio and background music into a polished radio show file.

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

Audio Mixing

Combine the TTS speech audio and Lyria background music into a single, polished radio show file.

Embedded Script

python3 skills/audio-mixing/scripts/mix_audio.py --workspace ./workspace

Arguments

ArgumentDefaultDescription
--workspaceworkspaceRoot workspace directory

What it does

  1. Loads speech from {workspace}/audio/speech/speech.wav.
  2. Adds 3 seconds of silence padding to the end of the speech to prevent it from being faded out.
  3. Loads background music from {workspace}/audio/music/background.mp3 (if exists).
  4. Loops music to match speech duration, lowers volume to -18dB.
  5. Overlays speech on music with a 1-second music intro.
  6. Adds fade-in/fade-out.
  7. Exports as MP3.

Dependencies

  • pydub
  • ffmpeg (system)

Mixing Guidelines

ElementLevelNotes
Speech0 dBUntouched, full volume
Background music-18 dBBarely audible — subtle bed under speech

Transitions

  • Music fade-in: 3 seconds
  • Music fade-out: 5 seconds
  • Overall fade-in: 500ms
  • Overall fade-out: 2 seconds

Output

FilePathFormat
MP3 (distribution){workspace}/audio/final/ai_radio.mp3MP3, 192kbps

Fallback

If no background music exists, produces speech-only output with just fade-in/fade-out applied.

More skills from google-gemini

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…
gemini-api-cli
google-gemini
Guide for using the Gemini API CLI tool. Use when you need to interact with the Gemini API via the command line, manage agents, or generate media (images,…
behavioral-evals
google-gemini
Guidance for creating, running, fixing, and promoting behavioral evaluations. Use when verifying agent decision logic, debugging failures, debugging prompt…
gemini-live-api-dev
google-gemini
Real-time bidirectional streaming with Gemini over WebSockets for audio, video, and text conversations. Supports audio input/output (16 kHz PCM), video frames, text, and automatic transcriptions with voice activity detection for interruption handling Includes native audio features: affective dialog, proactive audio, and thinking mode; function calling for synchronous and asynchronous tool use; and Google Search grounding Offers session management with context compression, resumption, and...
gemini-omni-flash-api
google-gemini
Use this skill for generative video editing, text-to-video, image-referenced video generation, and first-frame-to-video transition animations using the…
gemini-api-dev
google-gemini
Build applications with Google's Gemini models, supporting multimodal content, function calling, and structured outputs across Python, JavaScript, Go, and Java. Access current Gemini 3 models (Pro, Flash, Pro Image) with 1M token context; legacy Gemini 2.x and 1.5 models are deprecated Supports text generation, image/audio/video understanding, function calling, structured JSON output, code execution, context caching, and embeddings Official SDKs available: google-genai (Python),...
gemini-interactions-api
google-gemini
Unified interface for Gemini models and agents with server-side state, streaming, and tool orchestration. Supports multiple current models (gemini-3-flash-preview, gemini-3-pro-preview, gemini-2.5-flash/pro) and the Deep Research agent; automatically substitute deprecated model IDs with current alternatives Offload conversation history to the server via previous_interaction_id for stateful multi-turn interactions without manual history management Built-in tool orchestration including...
deliver
google-gemini
Posts a condensed version of the briefing to a Google Chat or Slack incoming webhook, so the daily run delivers itself — skips silently when no webhook is…