一键导入
music-generation
Generates original background music using Google's Music Generation API. Creates soundtracks matched to scene mood and timing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates original background music using Google's Music Generation API. Creates soundtracks matched to scene mood and timing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Align text to audio timestamps using Qwen3-ForcedAligner (~30ms precision)
Full pipeline from manga panels to animated video. Two audio modes: dialogue (Qwen3-TTS + karaoke captions) or music (ElevenLabs + rolling lyrics).
Burn karaoke captions into video using FFmpeg ASS subtitles (~20s for 16s video)
Generate multi-panel manga from character reference and story beats
Concatenates video clips and optionally adds background music using FFmpeg.
Generates anime character images from photo analysis using Nano Banana Pro (gemini-3-pro-image-preview). Creates character sheets with full body and portrait views at 2K resolution.
| name | Music Generation |
| description | Generates original background music using Google's Music Generation API. Creates soundtracks matched to scene mood and timing. |
| triggers | ["Video has been generated and needs soundtrack","User wants background music for their creation"] |
| keywords | ["music","soundtrack","BGM","audio"] |
Creates original background music that matches the mood and pacing of video scenes.
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
scene_description | str | Yes | — | What's happening in the scene |
mood | str | Yes | — | Emotional tone (see options) |
duration | int | No | 30 | Duration in seconds |
style | str | No | "anime_orchestral" | Music style |
| Mood | Description |
|---|---|
adventurous | Upbeat, exciting, forward momentum |
melancholic | Sad, reflective, bittersweet |
mysterious | Intriguing, suspenseful, curious |
joyful | Happy, celebratory, light |
epic | Grand, powerful, dramatic |
peaceful | Calm, serene, gentle |
| Style | Description |
|---|---|
anime_orchestral | Classic anime soundtrack feel |
lofi_chill | Relaxed, lo-fi hip hop vibe |
cinematic_epic | Big movie trailer sound |
cute_playful | Light, bouncy, kawaii |
electronic_ambient | Atmospheric synths |
| Output | Type | Description |
|---|---|---|
audio_path | Path | Path to generated audio file |
duration | float | Actual audio duration |
metadata | dict | Generation metadata |
class MusicGenerator:
async def execute(
self,
scene_description: str,
mood: str,
duration: int = 30,
style: str = "anime_orchestral"
) -> tuple[Path, dict]:
"""
Generate background music for a scene.
Raises:
ValueError: If mood or style is invalid
APIError: If Music API call fails
"""
...
from skills.generate_music import MusicGenerator
skill = MusicGenerator()
# Basic usage
audio_path, metadata = await skill.execute(
scene_description="Two characters explore a neon-lit city",
mood="adventurous"
)
# Full control
audio_path, metadata = await skill.execute(
scene_description="Peaceful morning in a meadow",
mood="peaceful",
duration=45,
style="anime_orchestral"
)
# Generate music to match video
video_path, video_meta = await video_skill.execute(...)
music_path, music_meta = await music_skill.execute(
scene_description=scene_concept["scene_description"],
mood=scene_concept["mood_for_music"],
duration=video_meta["duration"]
)
# Compose together
final = await compose_skill.execute(
video=video_path,
audio=music_path
)
See: https://ai.google.dev/gemini-api/docs/music-generation
| Error | Cause | Recovery |
|---|---|---|
ValueError | Invalid mood/style | Use supported option |
APIError | Music API failure | Retry with backoff |
DurationError | Duration out of range | Use 5-120 seconds |