ai-music · AI Music & BGM Generation

Generates original background music, scores, and instrumentals for short videos, vlogs, and social content: describe the style, mood, and instruments, and the skill submits → polls → downloads asynchronously, with optional trimming, loudness normalization, or mixing into video.
Supply lyrics for a vocal version; works with two providers — DashScope and Suno-compatible gateways. Bring your own API key; usage is metered.
Example invocation: "Generate a 30-second upbeat lo-fi instrumental for my vlog intro BGM."
Full brief
Positioning
ai-music is the text-to-music entry point: original background music, scores, and instrumentals for videos and social content. It does music only — no voiceover, no narration.
Core capabilities
- Instrumental BGM generation: style / mood / instrument description → mp3; duration settable on supported providers.
- Vocal mode: supplying
lyricsswitches to a sung version instead of an instrumental. - Pluggable providers:
dashscope(Alibaba Bailian) /suno-compatible(third-party Suno-like gateways) — switching providers only changes--providerplus env vars; the flow stays the same. - Full async flow: submit → poll → download (poll interval and timeout adjustable).
- Post-processing via shared scripts: trim to length, loudness-normalize to -14 LUFS, mix the BGM into video (adjustable voice/BGM volume ratio, auto-loop and truncate).
Workflow
- Confirm the available provider: run
model_registry.py configured --group music; if several are available and the user didn't name one, list them and ask checkthe configuration (no request sent; missing keys get a clear Chinese prompt — no wasted failed calls)generatethe music- Optional post-processing: trim / normalize / mix into video
Inputs & outputs
| Input | Notes |
|---|---|
| prompt | Required — style / mood / instrument description |
| provider | Optional — dashscope or suno-compatible (env override supported) |
| lyrics | Optional — triggers vocal mode when supplied |
| duration | Optional — seconds; supported by some providers |
| instrumental | Optional — instrumental-only BGM |
| output | Optional — defaults to outputs/<topic>/{name}.mp3 |
Output: music audio file (mp3), with the actual provider / model, polling trace, and final path printed.
Boundaries with adjacent skills
- tts-voiceover: human voiceover / narration / read-aloud; ai-music (this): background music and scores. They compose: BGM + narration mixed via
video_ops.py bgm.
Fit
- Intro/outro BGM for short videos and vlogs
- Scores for social content, podcast interstitials
- Original instrumental beds where needed
Before you start
- Configure keys in the project-root
.env: dashscope needsDASHSCOPE_API_KEY; suno-compatible needsMUSIC_API_KEY+MUSIC_BASE_URL. - Metered billing: run
checkbeforegenerate; keys are filled in by the user — the skill never requests, echoes, uploads, or commits real keys. - Never overwrites source material; only writes new files under
outputs/<topic>/.
ai-music is part of the Aiglade Skill library. Invoke it from the Aiglade chat box in plain language.