# Audio Mixing

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

- Skill: `google-gemini/audio-mixing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add google-gemini/audio-mixing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/google-gemini/audio-mixing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Google Gemini (https://skillmd.com/u/google-gemini)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/google-gemini/audio-mixing

---


# Audio Mixing

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

## Embedded Script

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

### Arguments

| Argument | Default | Description |
|----------|---------|-------------|
| `--workspace` | `workspace` | Root 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

| Element | Level | Notes |
|---------|-------|-------|
| Speech | 0 dB | Untouched, full volume |
| Background music | -18 dB | Barely 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

| File | Path | Format |
|------|------|--------|
| MP3 (distribution) | `{workspace}/audio/final/ai_radio.mp3` | MP3, 192kbps |

## Fallback

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

