6GB low minimum VRAM requirement for training
support for multiple speakers
create unique speakers through speaker mixing
even voices with light accompaniment can also be converted
F0 can be edited using Excel
https://github.com/PlayVoice/so-vits-svc-5.0/assets/16432329/6a09805e-ab93-47fe-9a14-9cbc1e0e7c3a
Powered by @ShadowVap
| Feature | From | Status | Function |
|---|---|---|---|
| whisper | OpenAI | ✅ | strong noise immunity |
| bigvgan | NVIDA | ✅ | alias and snake |
| natural speech | Microsoft | ✅ | reduce mispronunciation |
| neural source-filter | NII | ✅ | solve the problem of audio F0 discontinuity |
| speaker encoder | ✅ | Timbre Encoding and Clustering | |
| GRL for speaker | Ubisoft | ✅ | Preventing Encoder Leakage Timbre |
| one shot vits | Samsung | ✅ | Voice Clone |
| SCLN | Microsoft | ✅ | Improve Clone |
| PPG perturbation | this project | ✅ | Improved noise immunity and de-timbre |
| HuBERT perturbation | this project | ✅ | Improved noise immunity and de-timbre |
| VAE perturbation | this project | ✅ | Improve sound quality |
| MIX encoder | this project | ✅ | Improve conversion stability |
due to the use of data perturbation, it takes longer to train than other projects.
Install PyTorch.
Install project dependencies
shell
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
Note: whisper is already built-in, do not install it again otherwise it will cuase conflict and error
Download the Timbre Encoder: Speaker-Encoder by @mueller91, put best_model.pth.tar into speaker_pretrain/.
Download whisper model whisper-large-v2. Make sure to download large-v2.pt,put it into whisper_pretrain/.
Download hubert_soft model,put hubert-soft-0d54a1f4.pt into hubert_pretrain/.
Download pitch extractor crepe full,put full.pth into crepe/assets.
Download pretrain model sovits5.0.pretrain.pth, and put it into vits_pretrain/.
shell
python svc_inference.py --config configs/base.yaml --model ./vits_pretrain/sovits5.0.pretrain.pth --spk ./configs/singers/singer0001.npy --wave test.wav
Necessary pre-processing:
1. Separate vocie and accompaniment with UVR (skip if no accompaniment)
2. Cut audio input to shorter length with slicer, whisper takes input less than 30 seconds.
3. Manually check generated audio input, remove inputs shorter than 2 seconds or with obivous noise.
4. Adjust loudness if necessary, recommand Adobe Audiiton.
5. Put the dataset into the dataset_raw directory following the structure below.
dataset_raw
├───speaker0
│ ├───000001.wav
│ ├───...
│ └───000xxx.wav
└───speaker1
├───000001.wav
├───...
└───000xxx.wav
python sve_preprocessing.py -t 2
-t: threading, max number should not exceed CPU core count, usually 2 is enough.
After preprocessing you will get an output with following structure.
data_svc/
└── waves-16k
│ └── speaker0
│ │ ├── 000001.wav
│ │ └── 000xxx.wav
│ └── speaker1
│ ├── 000001.wav
│ └── 000xxx.wav
└── waves-32k
│ └── speaker0
│ │ ├── 000001.wav
│ │ └── 000xxx.wav
│ └── speaker1
│ ├── 000001.wav
│ └── 000xxx.wav
└── pitch
│ └── speaker0
│ │ ├── 000001.pit.npy
│ │ └── 000xxx.pit.npy
│ └── speaker1
│ ├── 000001.pit.npy
│ └── 000xxx.pit.npy
└── hubert
│ └── speaker0
│ │ ├── 000001.vec.npy
│ │ └── 000xxx.vec.npy
│ └── speaker1
│ ├── 000001.vec.npy
│ └── 000xxx.vec.npy
└── whisper
│ └── speaker0
│ │ ├── 000001.ppg.npy
│ │ └── 000xxx.ppg.npy
│ └── speaker1
│ ├── 000001.ppg.npy
│ └── 000xxx.ppg.npy
└── speaker
│ └── speaker0
│ │ ├── 000001.spk.npy
│ │ └── 000xxx.spk.npy
│ └── speaker1
│ ├── 000001.spk.npy
│ └── 000xxx.spk.npy
└── singer
├── speaker0.spk.npy
└── speaker1.spk.npy
Re-sampling
Generate audio with a sampling rate of 16000Hz in ./data_svc/waves-16k
python prepare/preprocess_a.py -w ./dataset_raw -o ./data_svc/waves-16k -s 16000
Generate audio with a sampling rate of 32000Hz in ./data_svc/waves-32k
python prepare/preprocess_a.py -w ./dataset_raw -o ./data_svc/waves-32k -s 32000
python prepare/preprocess_crepe.py -w data_svc/waves-16k/ -p data_svc/pitchpython prepare/preprocess_ppg.py -w data_svc/waves-16k/ -p data_svc/whisperpython prepare/preprocess_hubert.py -w data_svc/waves-16k/ -v data_svc/hubertpython prepare/preprocess_speaker.py data_svc/waves-16k/ data_svc/speakerpython prepare/preprocess_speaker_ave.py data_svc/speaker/ data_svc/singer python prepare/preprocess_spec.py -w data_svc/waves-32k/ -s data_svc/specs python prepare/preprocess_train.pypython prepare/preprocess_zzz.pypretrain: "./vits_pretrain/sovits5.0.pretrain.pth"
in configs/base.yaml,and adjust the learning rate appropriately, eg 5e-5.batch_szie: for GPU with 6G VRAM, 6 is the recommended value, 8 will work but step speed will be much slower.
2. Start training
python svc_trainer.py -c configs/base.yaml -n sovits5.0
3. Resume training
python svc_trainer.py -c configs/base.yaml -n sovits5.0 -p chkpt/sovits5.0/***.pth
4. Log visualization
tensorboard --logdir logs/
python svc_export.py --config configs/base.yaml --checkpoint_path chkpt/sovits5.0/***.ptf0, just run the following command.
python svc_inference.py --config configs/base.yaml --model sovits5.0.pth --spk ./data_svc/singer/your_singer.spk.npy --wave test.wav --shift 0f0 will be adjusted manually, follow the steps:test.vec.npy.
python whisper/inference.py -w test.wav -p test.ppg.npypython hubert/inference.py -w test.wav -v test.vec.npypython pitch/inference.py -w test.wav -p test.csvpython svc_inference.py --config configs/base.yaml --model sovits5.0.pth --spk ./data_svc/singer/your_singer.spk.npy --wave test.wav --ppg test.ppg.npy --vec test.vec.npy --pit test.csv --shift 0Notes
when --ppg is specified, when the same audio is reasoned multiple times, it can avoid repeated extraction of audio content codes; if it is not specified, it will be automatically extracted;
when --vec is specified, when the same audio is reasoned multiple times, it can avoid repeated extraction of audio content codes; if it is not specified, it will be automatically extracted;
when --pit is specified, the manually tuned F0 parameter can be loaded; if not specified, it will be automatically extracted;
generate files in the current directory:svc_out.wav
Arguments ref
| args | --config | --model | --spk | --wave | --ppg | --vec | --pit | --shift |
|---|---|---|---|---|---|---|---|---|
| name | config path | model path | speaker | wave input | wave ppg | wave hubert | wave pitch | pitch shift |
named by pure coincidence:average -> ave -> eva,eve(eva) represents conception and reproduction
python svc_eva.py
eva_conf = {
'./configs/singers/singer0022.npy': 0,
'./configs/singers/singer0030.npy': 0,
'./configs/singers/singer0047.npy': 0.5,
'./configs/singers/singer0051.npy': 0.5,
}
the generated singer file will be eva.spk.npy.
| Name | URL |
|---|---|
| KiSing | http://shijt.site/index.php/2021/05/16/kising-the-first-open-source-mandarin-singing-voice-synthesis-corpus/ |
| PopCS | https://github.com/MoonInTheRiver/DiffSinger/blob/master/resources/apply_form.md |
| opencpop | https://wenet.org.cn/opencpop/download/ |
| Multi-Singer | https://github.com/Multi-Singer/Multi-Singer.github.io |
| M4Singer | https://github.com/M4Singer/M4Singer/blob/master/apply_form.md |
| CSD | https://zenodo.org/record/4785016#.YxqrTbaOMU4 |
| KSS | https://www.kaggle.com/datasets/bryanpark/korean-single-speaker-speech-dataset |
| JVS MuSic | https://sites.google.com/site/shinnosuketakamichi/research-topics/jvs_music |
| PJS | https://sites.google.com/site/shinnosuketakamichi/research-topics/pjs_corpus |
| JUST Song | https://sites.google.com/site/shinnosuketakamichi/publication/jsut-song |
| MUSDB18 | https://sigsep.github.io/datasets/musdb.html#musdb18-compressed-stems |
| DSD100 | https://sigsep.github.io/datasets/dsd100.html |
| Aishell-3 | http://www.aishelltech.com/aishell_3 |
| VCTK | https://datashare.ed.ac.uk/handle/10283/2651 |
https://github.com/facebookresearch/speech-resynthesis paper
https://github.com/jaywalnut310/vits paper
https://github.com/openai/whisper/ paper
https://github.com/NVIDIA/BigVGAN paper
https://github.com/mindslab-ai/univnet paper
https://github.com/nii-yamagishilab/project-NN-Pytorch-scripts/tree/master/project/01-nsf
https://github.com/brentspell/hifi-gan-bwe
https://github.com/mozilla/TTS
https://github.com/bshall/soft-vc
https://github.com/maxrmorrison/torchcrepe
https://github.com/OlaWod/FreeVC paper
Adapter-Based Extension of Multi-Speaker Text-to-Speech Model for New Speakers
AdaSpeech: Adaptive Text to Speech for Custom Voice
Cross-Speaker Prosody Transfer on Any Text for Expressive Speech Synthesis
[Adversarial Speaker Disentanglement Using Unannotated External Data for Self-s
$ claude mcp add whisper-vits-svc \
-- python -m otcore.mcp_server <graph>