environmental preparation
- hardware requirement: Computers with NVIDIA GPUs (recommended video memory ≥ 16GB)
- software foundation: Python ≥ 3.8 + CUDA 11.8 environment
- Dependent Installation::
pip install -r requirements.txt+ FlashAttention 2 optimization package
workflow
- Lyrics preparation: Save plain text lyrics as a UTF-8 encoded .txt file (it is recommended that each line corresponds to a musical phrase)
- Basic Generation Commands::
python generate_song.py --lyrics lyrics.txt --output song.wav - Advanced Parameter Adjustment: can be accessed through
--styleSpecify the music style (pop/metal, etc.) with the--vocalSelect Vocal Type
Practical advice
For Chinese users, it is recommended to add the lyrics file to thephonetic transcriptionto improve the naturalness of the melody; the generation can be tested with a short 30-second clip (add the--duration 30parameter) before generating the full version.
This answer comes from the articleYuE: Transforms lyrics into a base model of a complete song, supporting a wide range of musical stylesThe































