Music generation

Write the lyrics, get a full song on your computer

Pick YuE2 in Speech, write lyrics, describe the style and vocals, and generate a song with vocals and accompaniment.

Direct answer

EdgeSpeak includes the YuE2 music model. Give it lyrics marked with sections such as [Verse] and [Chorus] plus one line about style, vocals and instruments, and it generates a complete 48 kHz stereo song on your computer. Generating with YuE2 is free and does not use your allowance; the weights keep the original authors' license and are for non-commercial use only.

Lyrics plus one line of style

Mark sections in the lyrics with tags such as [Verse] and [Chorus]; the singing follows the language of the lyrics. Describe style, vocals and instruments in one line, for example: indie folk, warm male vocal, breathy tone, acoustic guitar.

Check the score before generating

The model can plan an ABC score first, a melody with optional chords, so you can review and edit it before generating. You can also paste your own ABC score.

How long it takes

On Apple Silicon, generating and decoding the audio takes about 0.67× the song length, not counting melody planning and model loading at the start. On an NVIDIA RTX 4090, a 22.3-second song finishes in about 9.1 seconds.

Add word-by-word karaoke subtitles

Run EdgeSpeak forced alignment on the generated song to match the lyrics to the vocals, get start and end times for every word, and export karaoke subtitles that light up word by word.

Call it from the local API

The local gateway accepts m-a-p/YuE2-3B on /v1/audio/speech with the buffered-speech: 1 header. It can also return the audio and the score together.

curl http://127.0.0.1:1117/v1/audio/speech -H "Authorization: Bearer $EDGESPEAK_API_KEY" -H "Content-Type: application/json" -H "buffered-speech: 1" -d '{"model":"m-a-p/YuE2-3B","voice":"builtin:auto","instructions":"Indie folk, warm male vocal, acoustic guitar","input":"[Verse]\nWalking under city lights\n[Chorus]\nSing it back to me","response_format":"wav"}' -o song.wav

FAQ

Can I use the songs commercially?

No. The YuE2 weights keep the original authors' CC BY-NC 4.0 license and are for non-commercial use only.

Does it cost anything or use my allowance?

No. Generating songs with YuE2 is free and does not use your allowance.

Does it need an internet connection?

Only to download the YuE2 model. Once it is installed, songs are generated on your computer.

Evidence links