Retrieval-based-Voice-Conversion-WebUI

A simple, easy-to-use voice timbre conversion / voice changer framework.

[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE) [![Huggingface](https://img.shields.io/badge/๐Ÿค—%20-Models-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) [**Changelog**](./Changelog_EN.md) | [**FAQ (Frequently Asked Questions)**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/wiki/FAQ-(Frequently-Asked-Questions)) [**English**](../en/README.en.md) | [**ไธญๆ–‡็ฎ€ไฝ“**](../../README.md) | [**ๆ—ฅๆœฌ่ชž**](../jp/README.ja.md) | [**ํ•œ๊ตญ์–ด**](../kr/README.ko.md) ([**้Ÿ“ๅœ‹่ชž**](../kr/README.ko.han.md)) | [**Franรงais**](../fr/README.fr.md) | [**Tรผrkรงe**](../tr/README.tr.md) | [**Portuguรชs**](../pt/README.pt.md)
> Check out our [Demo Video](https://www.bilibili.com/video/BV1pm4y1z7Gm/) here!
Training and inference Webui Real-time voice changing GUI
go-webui.bat go-realtime_gui.bat
You can freely choose the action you want to perform. We have achieved an end-to-end latency of 170ms. With the use of ASIO input and output devices, we have managed to achieve an end-to-end latency of 90ms, but it is highly dependent on hardware driver support.
> The dataset for the pre-training model uses nearly 50 hours of high quality audio from the VCTK open source dataset. > High quality licensed song datasets will be added to the training-set often for your use, without having to worry about copyright infringement. > Please look forward to the pretrained base model of RVCv3, which has larger parameters, more training data, better results, unchanged inference speed, and requires less training data for training. ## Features: + Reduce tone leakage by replacing the source feature to training-set feature using top1 retrieval; + Easy + fast training, even on poor graphics cards; + Training with a small amounts of data (>=10min low noise speech recommended); + Model fusion to change timbres (using ckpt processing tab->ckpt merge); + Easy-to-use WebUI; + pymss/MSST model to quickly separate vocals and instruments; + High-pitch Voice Extraction Algorithm [InterSpeech2023-RMVPE](#Credits) to prevent a muted sound problem. Provides the best results (significantly) and is faster with lower resource consumption than Crepe_full; + AMD/Intel systems use the CPU dependency set; Windows may use DirectML and Linux uses CPU; ## Environment setup This branch targets **Python 3.12 x64**. Run every command from the repository root. Ubuntu 24.04 x86_64 is recommended. ### Ubuntu 24.04 ```bash sudo apt update sudo apt install -y python3.12 python3.12-venv python3.12-dev ffmpeg unzip libsndfile1 libportaudio2 python3.12 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip setuptools wheel ``` ### Windows Install Python 3.12 x64, then create a virtual environment: ```powershell py -3.12 -m venv .venv .venv\Scripts\activate python -m pip install --upgrade pip setuptools wheel ``` ### Choose dependencies by hardware | Hardware | Installation | | --- | --- | | CPU, AMD, Intel | Use `requirments_cpu_py312.txt`; Windows may use DirectML, while Linux uses CPU | | NVIDIA RTX 50 series | Install the CUDA 12.8 Torch pair first, then `requirments_cu128_py312.txt` | | NVIDIA GPUs before the RTX 50 series | Install the CUDA 11.8 Torch pair first, then `requirments_cu118_py312.txt` | #### CPU, AMD, Intel ```bash python -m pip install -r requirments_cpu_py312.txt ``` #### NVIDIA RTX 50 series: two stages ```bash python -m pip install torch==2.7.1+cu128 torchaudio==2.7.1+cu128 \ --index-url https://download.pytorch.org/whl/cu128 \ --extra-index-url https://pypi.org/simple python -m pip install -r requirments_cu128_py312.txt ``` #### NVIDIA GPUs before the RTX 50 series: two stages ```bash python -m pip install torch==2.7.1+cu118 torchaudio==2.7.1+cu118 \ --index-url https://download.pytorch.org/whl/cu118 \ --extra-index-url https://pypi.org/simple python -m pip install -r requirments_cu118_py312.txt ``` Verify Torch and CUDA: ```bash python -c "import torch; print('torch:', torch.__version__); print('cuda:', torch.version.cuda); print('cuda available:', torch.cuda.is_available())" ``` ### Package indexes The three `requirments_*.txt` files define their package indexes at the top. Keep the default mirrors in mainland China. To use official indexes, replace only `--index-url` and `--extra-index-url`; keep package versions, CUDA suffixes, and the two-stage order unchanged. | Default mirror | Official source | | --- | --- | | `https://mirrors.pku.edu.cn/pypi/simple` | `https://pypi.org/simple` | | `https://mirrors.nju.edu.cn/pytorch/whl/cpu` | `https://download.pytorch.org/whl/cpu` | | `https://mirrors.nju.edu.cn/pytorch/whl/cu118` | `https://download.pytorch.org/whl/cu118` | | `https://mirrors.nju.edu.cn/pytorch/whl/cu128` | `https://download.pytorch.org/whl/cu128` | ## Models and runtime directories The WebUI creates runtime directories automatically. Download models from the [Hugging Face model repository](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main) and keep this layout: ```text assets/ โ”œโ”€โ”€ hubert_base/ โ”‚ โ”œโ”€โ”€ config.json โ”‚ โ”œโ”€โ”€ preprocessor_config.json โ”‚ โ””โ”€โ”€ pytorch_model.bin โ”œโ”€โ”€ rmvpe/rmvpe.pt โ”œโ”€โ”€ pretrained/ โ”œโ”€โ”€ pretrained_v2/ โ”œโ”€โ”€ pymss_weights/ โ”œโ”€โ”€ weights/ # user RVC .pth models โ””โ”€โ”€ indices/ # user .index files logs/ โ””โ”€โ”€ mute/ # training silence samples # Exact paths used by the code assets/hubert_base/config.json assets/hubert_base/preprocessor_config.json assets/hubert_base/pytorch_model.bin assets/rmvpe/rmvpe.pt assets/pretrained/*.pth assets/pretrained_v2/*.pth assets/pymss_weights/* assets/weights/*.pth assets/indices/*.index logs/mute/* ``` ### Download models ```bash python -m pip install --upgrade huggingface_hub # Required for inference and feature extraction hf download lj1995/VoiceConversionWebUI --revision main \ --include "hubert_base/*" --local-dir assets hf download lj1995/VoiceConversionWebUI rmvpe.pt --revision main \ --local-dir assets/rmvpe # Required for v1/v2 training hf download lj1995/VoiceConversionWebUI --revision main \ --include "pretrained/*" "pretrained_v2/*" --local-dir assets hf download lj1995/VoiceConversionWebUI mute.zip --revision main \ --local-dir .model-downloads python -m zipfile -e .model-downloads/mute.zip logs # Required only for pymss/MSST vocal separation hf download lj1995/VoiceConversionWebUI --revision main \ --include "pymss_weights/*" --local-dir assets ``` Windows AMD/Intel DirectML environments additionally need: ```bash hf download lj1995/VoiceConversionWebUI rmvpe.onnx --revision main \ --local-dir assets/rmvpe ``` ### FFmpeg The Ubuntu setup command above installs FFmpeg. On Windows, place these files in the repository root: - [ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/ffmpeg.exe?download=true) - [ffprobe.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/ffprobe.exe?download=true) ## Start the WebUI ```bash python webui.py ``` For a headless Ubuntu server: ```bash python webui.py --noautoopen ``` The default port is `7865`. Put personal `.pth` models in `assets/weights/` and `.index` files in `assets/indices/`. ## Credits + [ContentVec](https://github.com/auspicious3000/contentvec/) + [VITS](https://github.com/jaywalnut310/vits) + [HIFIGAN](https://github.com/jik876/hifi-gan) + [Gradio](https://github.com/gradio-app/gradio) + [FFmpeg](https://github.com/FFmpeg/FFmpeg) + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui) + [pymss-project/pymss](https://github.com/pymss-project/pymss) + [audio-slicer](https://github.com/openvpi/audio-slicer) + [Vocal pitch extraction:RMVPE](https://github.com/Dream-High/RMVPE) + The pretrained model is trained and tested by [yxlllc](https://github.com/yxlllc/RMVPE) and [RVC-Boss](https://github.com/RVC-Boss). ## Thanks to all contributors for their efforts