music-generation
Generate ambient background music using Lyria via the Interactions API.
- License 许可
- MIT
- 最近更新
- 2026-09-01
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- music-generation
- description
- Generate ambient background music using Lyria via the Interactions API.
02 资源文件 1
- 脚本scripts/generate_music.py4.4 KB
03 SKILL.md 正文
Music Generation
Generate background music for the radio show using the Lyria model via the Interactions API.
Embedded Script
python3 skills/music-generation/scripts/generate_music.py --workspace ./workspace --mood tech
Arguments
| Argument | Default | Description |
|---|---|---|
--workspace |
workspace |
Root workspace directory |
--mood |
default |
Music mood (see moods below) |
Moods
| Mood | Style | Pair with --style |
|---|---|---|
tech (default) |
Clean synths, electronic pulse, Silicon Valley startup vibe | explainer, debate |
chill |
Soft pads, gentle piano, lo-fi warmth | roundtable, explainer |
debate |
Building tension, brass-like synths, panel discussion opener | debate, interview |
What it does
- Selects the music prompt based on
--mood. - Calls the Interactions API with the
lyria-3-clip-previewmodel. - Generates a ~30-second music clip.
- Saves as MP3 to
{workspace}/audio/music/background.mp3. - Gracefully handles failures — the pipeline continues without music.
Dependencies
google-genai(>= 2.0.0)
Output
- File:
{workspace}/audio/music/background.mp3 - Format: MP3
- Duration: ~30 seconds
Fallback
Lyria is experimental. If generation fails with a policy error or returns no music, the script will attempt to retry once with a simpler fallback prompt: "Create a 30-second simple ambient background track. Instrumental only, calm and neutral."
If the fallback attempt also fails, the pipeline proceeds without background music — the audio-mixing step handles this gracefully.
04 同仓库更多 Skills
workspace-agent
暂无简介
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
ui-ux-expert
暂无简介
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
test-agent
暂无简介