Coding

Doubao Genbgm

Try it

Based on the Volcano Engine Doubao Music Generation API, supports instrumental BGM generation and vocal song generation.

What it does

Based on the Volcano Engine Doubao Music Generation API, supports instrumental BGM generation and vocal song generation. BGM mode generates background music from text descriptions; Song mode supports generating complete vocal songs from prompts or lyrics, with control over genre, mood, timbre, key, tempo, instruments, and more. Use this skill when users need to generate background music, BGM, songs, or soundtracks.

The skill document

Doubao Music Generation Skill

Based on the Volcano Engine Doubao Music Generation API, a single script supports two modes:

  • BGM Mode: Text description -> instrumental background music (no vocals)
  • Song Mode: Prompt or lyrics -> complete vocal song

Prerequisites

1. Install Dependencies

pip install requests

2. Configure Authentication

# Edit .env and fill in your Volcano Engine AccessKey and SecretKey
export VOLC_ACCESS_KEY=$VOLC_ACCESS_KEY

# 火山引擎 Secret Access Key(必填)
export VOLC_SECRET_KEY=$VOLC_SECRET_KEY

Obtain your AccessKeyId and SecretAccessKey from the Volcano Engine Console -> Key Management.


1. Instrumental BGM Generation

# Basic BGM generation
python3 scripts/gen_music.py \
  --mode bgm \
  --text "Cafe light music, piano and guitar, relaxing and healing, 60 seconds" \
  --output cafe_bgm.mp3

# Specify duration and format
python3 scripts/gen_music.py \
  --mode bgm \
  --text "Epic cinematic soundtrack, string ensemble with brass, magnificent and awe-inspiring" \
  --duration 90 \
  --format wav \
  --output epic.wav

# Use structured segments (v5.0)
python3 scripts/gen_music.py \
  --mode bgm \
  --text "Electronic dance music, EDM style, energetic" \
  --segments '[{"Name":"intro","Duration":10},{"Name":"chorus","Duration":30},{"Name":"outro","Duration":10}]' \
  --output edm_bgm.mp3

# Enable prompt rewrite (improves results)
python3 scripts/gen_music.py \
  --mode bgm \
  --text "Sports video soundtrack" \
  --rewrite \
  --duration 60 \
  --output sport.mp3

2. Vocal Song Generation

# Generate song from prompt
python3 scripts/gen_music.py \
  --mode song \
  --prompt "A song about summer and the seaside, lighthearted and cheerful" \
  --genre "Pop" \
  --mood "Happy" \
  --gender Female \
  --output summer.mp3

# Generate song from lyrics (v4.3, fine-grained control)
python3 scripts/gen_music.py \
  --mode song \
  --lyrics "[verse]
I remember that day, the day we fell in love
Promised each other we'd never say goodbye
[chorus]
The day I gave my heart to you
You disappeared before my eyes" \
  --model-version v4.3 \
  --genre "Folk" \
  --mood "Sentimental/Melancholic/Lonely" \
  --gender Female \
  --timbre "Ethereal" \
  --output folk_song.mp3

# Read lyrics from file
python3 scripts/gen_music.py \
  --mode song \
  --lyrics-file my_lyrics.txt \
  --genre "Chinese Style" \
  --mood "Dreamy/Ethereal" \
  --output guofeng.mp3

# Fine-grained control (key/tempo/instruments)
python3 scripts/gen_music.py \
  --mode song \
  --prompt "Jazz-style urban life" \
  --model-version v4.3 \
  --genre "Jazz" \
  --mood "Chill" \
  --gender Male \
  --timbre "Magnetic" \
  --key "C" \
  --kmode "Major" \
  --tempo "Moderato" \
  --instrument "Saxophone,Acoustic_Piano,Bass" \
  --scene "Coffee Shop,Evening" \
  --output jazz_city.mp3

# English song
python3 scripts/gen_music.py \
  --mode song \
  --prompt "A song about chasing dreams and never giving up" \
  --model-version v4.3 \
  --genre "Pop Rock" \
  --mood "Inspirational/Hopeful" \
  --gender Male \
  --lang English \
  --output dream.mp3

Parameter Reference

Common Parameters

ParameterDescriptionDefault
--modebgm=instrumental, song=vocal songbgm
--billingprepaid=prepaid, postpaid=postpaidpostpaid
--durationDuration in seconds; BGM: [30,120], Song: [30,240]60
--formatOutput format mp3 / wavmp3
--outputOutput file pathoutput.mp3
--poll-intervalPolling interval in seconds5

BGM-Specific Parameters

ParameterDescriptionDefault
--textBGM description (required), can include genre/mood/scene/instruments in the text-
--versionModel versionv5.0
--rewriteEnable automatic prompt rewriteoff
--segmentsStructured segments JSON (v5.0 only)-

Song-Specific Parameters

ParameterDescriptionDefault
--promptPrompt (choose one of --lyrics or --prompt)-
--lyricsLyrics text (supports structural tags)-
--lyrics-fileRead lyrics from file-
--model-versionv4.0 / v4.3 / v5.0v4.3
--genrePrimary genre (e.g. Pop / Folk / Electronic)-
--genre-extraSecondary genres, comma-separated (v4.3)-
--moodMood (e.g. Happy / Dreamy/Ethereal)-
--genderVocal gender Male / Female-
--timbreTimbre (e.g. Warm / Husky / Ethereal)-
--langLanguage (Chinese/English/Cantonese etc.)Chinese
--keyKey (A/A#/B/C etc., v4.3)-
--kmodeMode Major / Minor (v4.3)-
--tempoTempo (Grave/Andante/Allegro etc., v4.3)-
--instrumentInstruments, comma-separated, up to 5 (v4.3)-
--sceneScenes, comma-separated, up to 3 (v4.3)-
--skip-copy-checkDisable lyrics copyright checkoff

For more enum values, see references/params.md.


Notes

  • Short simple music (30s + minimal description) is likely to trigger copyright checks; it is recommended to enrich the description, add more parameters, or increase the duration
  • Audio download links are time-limited; the script automatically downloads the file locally after generation
  • BGM v5.0 does not require separate Genre/Mood parameters; describe them directly in the Text field
  • Vocal songs v4.0 and v4.3 differ in the supported enum values for each field; see the parameter documentation for details

Related skills

Create original songs, AI-generated music, lyrics-to-song tracks, instrumentals, background music, video soundtracks, jingles, multilingual songs, and reference-led arrangements from a clear creative brief. This AI music generator and AI song maker develops genre, mood, structure, singable lyrics, vocal direction, and production style, then creates reviewable audio with Suno 5.5 or another model you explicitly choose. Use it as an AI music studio for songwriting, an AI lyrics writer, text-to-music creation, BGM generation, brand music, podcast themes, game music, bilingual songs, or focused new versions of reference audio. Review vocals, pronunciation, duration, loop points, and arrangement fit after generation, then refine the strongest result.

Create original songs, AI-generated music, lyrics-to-song tracks, instrumentals, background music, video soundtracks, jingles, multilingual songs, and reference-led arrangements from a clear creative brief. This AI music generator and AI song maker develops genre, mood, structure, singable lyrics, vocal direction, and production style, then creates reviewable audio with Suno 5.5 or another model you explicitly choose. Use it as an AI music studio for songwriting, an AI lyrics writer, text-to-music creation, BGM generation, brand music, podcast themes, game music, bilingual songs, or focused new versions of reference audio. Review vocals, pronunciation, duration, loop points, and arrangement fit after generation, then refine the strongest result.

Generate songs, instrumentals, or lyrics-driven tracks through a structured OpenClaw-native workflow with anti-sparse prompt engineering and quality verification. Provider-agnostic — works with any music backend the runtime exposes (ACE-Step, MusicGen, Stable Audio, mmx).

10 installs

Turn a person's story and occasion into original lyrics and a newly generated song. This personalized song maker and custom song generator workflow collects the recipient, relationship, occasion, memories, and must-include details, drafts the title, lyrics, section structure, genre, and mood for approval, then generates one finished original song, and reviews story accuracy, name pronunciation, hook, lyric rendering, and vocal result. Use it for custom birthday songs, wedding songs, anniversary songs, proposal songs, family tribute songs, and company or team anthems, with one approved lyric draft and one song generation per run and honest post-result review.

Generate songs from prompts or lyrics through an ACE-Step-compatible API backend. Use when users want text-to-music, lyrics-to-song, fast prompt iteration, s...

25 installs

Turn complete lyrics, a rough lyric draft, loose lines, or an existing hook into a structured, listenable Suno song. This Suno lyrics-to-song workflow works as an AI song generator from lyrics and AI music generator from lyrics: choose Preserve mode to keep every original line or Refine mode to improve rhythm, rhyme, singability, and hook strength. Build the song structure across verses, chorus, bridge, and purposeful repetition, then create a style prompt for music with genre, mood, arrangement, and vocal direction for Suno custom lyrics. Use it to turn lyrics into a song, make a song from lyrics, convert lyrics to music, get help from a lyrics songwriting assistant, or take rough lyrics to song-ready form through a custom lyrics-to-song process.