tencent-ailab / SongGeneration 2
SongGeneration 2
Song Generation 2 generates full songs with vocals and instrumentals from lyrics — supports 14 genres, reference audio cloning, and separate track output (vocal/bgm/mix).
# Song Generation 2
Generate full songs with vocals and instrumentals from lyrics — supports 14 genres, reference audio cloning, and separate track output (vocal/bgm/mix).
---
### Parameters
- lyrics (string, default: empty) — Song lyrics with structure tags. If empty, switches to instrumental mode automatically.
- caption (string, default: empty) — Music style description as comma-separated tags (e.g. female, pop, energetic, piano).
- audio (string, default: null) — Path to a reference audio file to clone its style.
- genre (string, default: empty) — Genre selection: Pop, Rock, Electronic, Hip-Hop, R&B/Soul, Jazz, Latin, Country, Metal, Ballad, Funk, Soundtrack, World, Auto.
- generate_type (string, default: mixed) — Output type: mixed, bgm, vocal, separate.
### Advanced
- guidance_scale (float, default: 1.5) — How closely the output follows the prompt. Higher = more faithful.
- temperature (float, default: 0.9) — Creativity level. Higher = more diverse, lower = more predictable.
### Style Control
Priority: audio > genre > caption
- If audio is provided — reference audio is used to clone the style. Caption and genre are ignored.
- If genre is provided (no audio) — predefined genre tokens are used. Caption is ignored.
- If caption is provided (no audio, no genre) — free-text description guides the generation.
- If none are provided — default generation with [Musicality-very-high] tag.
Important: Do not combine audio with caption — if both are provided, caption is silently discarded.
Example prompts
Great starting points for SongGeneration 2.
API quick start
Run SongGeneration 2 with a single API call.
{
"prompt": "[verse]\nBright lights flashing in the cit…",
"caption": "female, slow, piano",
"temperature": 0.8,
"inputAudio": "https://your-cdn.com/input.mp3"
}