Use DDSP Vocoders in DiffSinger (OpenVPI version)
September 18, 2023 ยท View on GitHub
Suppose you have already trained a model called exp/combsub-test/model_100000.pt using the code in this repository, run
python export.py -m exp/combsub-test/model_100000.pt --traced
This will create a .jit format model file in the same directory.
Then, move this .jit model file and the config.yaml together to the checkpoints/ddsp directory of the DiffSinger repository.
Finally, edit the configs/acoustic.yaml file in the DiffSinger repository to enable the DDSP vocoder. the details are:
- Set the
vocoderoption toDDSP. - Set the
vocoder_ckptoption to the path of the.jitmodel. An example may becheckpoints/ddsp/model_100000-traced-torch1.9.1.jit - Check whether other mel related parameters match the parameters in the
checkpoints/ddsp/config.yamlfile. For the details, theaudio_sample_rate,audio_num_mel_bins,hop_size,fft_size,win_size,fminandfmaxin theconfigs/acoustic.yamlneed to matchsampling_rate,n_mels,block_size,n_fft,win_length,mel_fminandmel_fmaxin thecheckpoints/ddsp/config.yaml, respectively.
After doing all this, DiffSinger's default NSF-HiFiGAN vocoder has been replaced by your own trained DDSP vocoder, and you can perform preprocessing, training or inference normally.