tencent/SongGeneration

Space

SongPrep

752

99 commits

1 linked in READMEs

updated Jun 17, 2026

See the code

README

SongPrep

Demo  |  Paper  |  Weight  |  Dataset

This repository is the official code repository for SongPrep: A Preprocessing Framework and End-to-end Model for Full-song Structure Parsing and Lyrics Transcription. SongPrep is able to analyze the structure and lyrics of entire songs and provide precise timestamps without the need for additional source separation. In this repository, we provide the SongPrep model, inference scripts, and checkpoints trained on the Million Song Dataset that support both Chinese and English.

Evaluation

Results are reported in Diarization Error Rate (DER) for structure parsing and Word Error Rate (WER) for lyrics transcription.

Model#ParamsWERDER
SongPrep7B23.5%18.2%
Gemini-2.5-29.2%94.6%
Seed-ASR12B+104.1%-
Qwen3-ASR-33.3%-
Qwen-Audio8.4B232.7%-

Installation

Start from scratch

You can install the necessary dependencies using the requirements.txt file with Python>=3.8.12 and CUDA>=11.8:

pip install -r requirements.txt

Usage

To ensure the model runs correctly, please download the weight from the original source at Hugging Face, and save it into root directory of the project.

Once everything is set up, you can run the inference script using the following command:

With transformers

python3 run.py -i your_wav_path

The complete output may look like:

[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric
  • The song is divided into segments by ';'.
  • The structure is the label from structure analysis for the segment.
  • The start and end are the segment’s start and end times.
  • The lyric is the recognized lyrics, where sentences separated by '.'.

With vllm

python3 run.py -i your_wav_dir

The complete output may look like:

=====wav_name=====
[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric

=====wav_name=====
[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric

=====wav_name=====
[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric

Citation

@misc{tan2025songpreppreprocessingframeworkendtoend,
      title={SongPrep: A Preprocessing Framework and End-to-end Model for Full-song Structure Parsing and Lyrics Transcription}, 
      author={Wei Tan and Shun Lei and Huaicheng Zhang and Guangzheng Li and Yixuan Zhang and Hangting Chen and Jianwei Yu and Rongzhi Gu and Dong Yu},
      year={2025},
      eprint={2509.17404},
      archivePrefix={arXiv},
      primaryClass={eess.AS},
      url={https://arxiv.org/abs/2509.17404}, 
}

License

The code and weights in this repository is released in the LICENSE file.

docker

Contributors

RO
root

74 commits

HA
hainazhu

19 commits

waytan22

5 commits

victor

1 commits

tencent/SongGeneration

Space

SongPrep

752

99 commits

1 linked in READMEs

updated Jun 17, 2026

See the code

README

SongPrep

Demo  |  Paper  |  Weight  |  Dataset

This repository is the official code repository for SongPrep: A Preprocessing Framework and End-to-end Model for Full-song Structure Parsing and Lyrics Transcription. SongPrep is able to analyze the structure and lyrics of entire songs and provide precise timestamps without the need for additional source separation. In this repository, we provide the SongPrep model, inference scripts, and checkpoints trained on the Million Song Dataset that support both Chinese and English.

Evaluation

Results are reported in Diarization Error Rate (DER) for structure parsing and Word Error Rate (WER) for lyrics transcription.

Model#ParamsWERDER
SongPrep7B23.5%18.2%
Gemini-2.5-29.2%94.6%
Seed-ASR12B+104.1%-
Qwen3-ASR-33.3%-
Qwen-Audio8.4B232.7%-

Installation

Start from scratch

You can install the necessary dependencies using the requirements.txt file with Python>=3.8.12 and CUDA>=11.8:

pip install -r requirements.txt

Usage

To ensure the model runs correctly, please download the weight from the original source at Hugging Face, and save it into root directory of the project.

Once everything is set up, you can run the inference script using the following command:

With transformers

python3 run.py -i your_wav_path

The complete output may look like:

[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric
  • The song is divided into segments by ';'.
  • The structure is the label from structure analysis for the segment.
  • The start and end are the segment’s start and end times.
  • The lyric is the recognized lyrics, where sentences separated by '.'.

With vllm

python3 run.py -i your_wav_dir

The complete output may look like:

=====wav_name=====
[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric

=====wav_name=====
[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric

=====wav_name=====
[structure][start:end]lyric ; [structure][start:end]lyric ; [structure][start:end]lyric

Citation

@misc{tan2025songpreppreprocessingframeworkendtoend,
      title={SongPrep: A Preprocessing Framework and End-to-end Model for Full-song Structure Parsing and Lyrics Transcription}, 
      author={Wei Tan and Shun Lei and Huaicheng Zhang and Guangzheng Li and Yixuan Zhang and Hangting Chen and Jianwei Yu and Rongzhi Gu and Dong Yu},
      year={2025},
      eprint={2509.17404},
      archivePrefix={arXiv},
      primaryClass={eess.AS},
      url={https://arxiv.org/abs/2509.17404}, 
}

License

The code and weights in this repository is released in the LICENSE file.

docker

Contributors

RO
root

74 commits

HA
hainazhu

19 commits

waytan22

5 commits

victor

1 commits