Diff-HierVC: Diffusion-based Hierarchical Voice Conversion with Robust Pitch Generation and Masked Prior for Zero-shot Speaker Adaptation ![](https://camo.githubusercontent.com/2706ad9bd4a41cb8d5ecd3b9b0ad539cdb1ebf695bfa07eb4cab37d6ff4b76ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f63732e43562d323331312e30343639332d6233316231623f6c6f676f3d6172786976266c6f676f436f6c6f723d726564)
The official Pytorch implementation of Diff-HierVC (Interspeeh 2023, Oral)
Ha-Yeong Choi, Sang-Hoon Lee, Seong-Whan Lee
Overall architecture
Although voice conversion (VC) systems have shown a remarkable ability to transfer voice style, existing methods still have an inaccurate pitch and low speaker adaptation quality. To address these challenges, we introduce Diff-HierVC, a hierarchical VC system based on two diffusion models. We first introduce DiffPitch, which can effectively generate
$F_0$ with the target voice style. Subsequently, the generated$F_0$ is fed to DiffVoice to convert the speech with a target voice style. Furthermore, using the source-filter encoder, we disentangle the speech and use the converted Mel-spectrogram as a data-driven prior in DiffVoice to improve the voice style transfer capacity. Finally, by using the masked prior in diffusion models, our model can improve the speaker adaptation quality. Experimental results verify the superiority of our model in pitch generation and voice style transfer performance, and our model also achieves a CER of 0.83% and EER of 3.29% in zero-shot VC scenarios.
https://diff-hiervc.github.io/audio_demo/
Our model checkpoints can be downloaded here.
- model_diffhier.pth
- voc_ckpt.pth
- Clone this rep && Install python requirement
git clone https://github.com/hayeong0/Diff-HierVC.git
pip install -r req*
- Download the pre-trained model checkpoint from drive and place it in the following path.
.
โโโ ckpt
โ โโโ config.json
โ โโโ model_diffhier.pth โ
โโโ inference.py
โโโ infer.sh
โโโ model
โโโ module
โโโ requirements.txt
โโโ utils
โโโ vocoder
โโโ hifigan.py
โโโ modules.py
โโโ voc_ckpt.pth โ
- Run
infer.sh
diffpitch_ts
refers to the time step of the pitch generator and diffvoice_ts
refers to the time step of the Mel generator.
Empirically, it has been observed that if the time step of diffpitch is too small, noise remains, and if it is too large, excessive diversity occurs.
Please use it appropriately for your dataset!
bash infer.sh
python3 inference.py \
--src_path './sample/src_p241_004.wav' \
--trg_path './sample/tar_p239_022.wav' \
--ckpt_model './ckpt/model_diffhier.pth' \
--ckpt_voc './vocoder/voc_ckpt.pth' \
--output_dir './converted' \
--diffpitch_ts 30 \
--diffvoice_ts 6
๐ง Test it on your own dataset and share your interesting results! :)
@inproceedings{choi23d_interspeech,
author={Ha-Yeong Choi and Sang-Hoon Lee and Seong-Whan Lee},
title={{Diff-HierVC: Diffusion-based Hierarchical Voice Conversion with Robust Pitch Generation and Masked Prior for Zero-shot Speaker Adaptation}},
year=2023,
booktitle={Proc. INTERSPEECH 2023},
pages={2283--2287},
doi={10.21437/Interspeech.2023-817}
}
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.