hayeong0 / Diff-HierVC

Official Pytorch Implementation of "Diff-HierVC: Diffusion-based Hierarchical Voice Conversion with Robust Pitch Generation and Masked Prior for Zero-shot Speaker Adaptation"

Home Page:https://diff-hiervc.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Diff-HierVC: Diffusion-based Hierarchical Voice Conversion with Robust Pitch Generation and Masked Prior for Zero-shot Speaker Adaptation

The official Pytorch implementation of Diff-HierVC (Interspeeh 2023, Oral)

Ha-Yeong Choi, Sang-Hoon Lee, Seong-Whan Lee

image

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.

🎧 Audio Demo

https://diff-hiervc.github.io/audio_demo/

πŸ“‘ Pre-trained Model

Our model checkpoints can be downloaded here.

  • model_diffhier.pth
  • voc_hifigan.pth
  • voc_bigvgan.pth

πŸ”¨ Usage

  1. Clone this rep && Install python requirement
git clone https://github.com/hayeong0/Diff-HierVC.git
pip install -r req*
  1. 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_hifigan.pth βœ…
    └── voc_bigvgan.pth βœ…
  1. 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_bigvgan.pth' \
    --output_dir './converted' \
    --diffpitch_ts 30 \
    --diffvoice_ts 6

🎧 Test it on your own dataset and share your interesting results! :)

πŸŽ“ Citation

@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}
}

πŸ’Ž Acknowledgements

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

Official Pytorch Implementation of "Diff-HierVC: Diffusion-based Hierarchical Voice Conversion with Robust Pitch Generation and Masked Prior for Zero-shot Speaker Adaptation"

https://diff-hiervc.github.io/


Languages

Language:Python 99.8%Language:Shell 0.2%