Files
Retrieval-based-Voice-Conve…/README.md

235 lines
9.3 KiB
Markdown
Raw Normal View History

2026-07-19 21:17:17 +08:00
<div align="center">
<h1>Retrieval-based-Voice-Conversion-WebUI</h1>
简单易用的 语音音色转换/变声器 框架<br><br>
2026-07-19 21:17:17 +08:00
[![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)
<img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
[![Licence](https://img.shields.io/badge/LICENSE-MIT-green.svg?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/)
2026-07-19 21:17:17 +08:00
[**更新日志**](./docs/cn/Changelog_CN.md) | [**常见问题解答**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E8%A7%A3%E7%AD%94) | [**AutoDL·5毛钱训练AI歌手**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/wiki/Autodl%E8%AE%AD%E7%BB%83RVC%C2%B7AI%E6%AD%8C%E6%89%8B%E6%95%99%E7%A8%8B) | [**对照实验记录**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/wiki/%E5%AF%B9%E7%85%A7%E5%AE%9E%E9%AA%8C%C2%B7%E5%AE%9E%E9%AA%8C%E8%AE%B0%E5%BD%95) | [**在线演示**](https://modelscope.cn/studios/FlowerCry/RVCv2demo)
2026-07-19 21:17:17 +08:00
[**English**](./docs/en/README.en.md) | [**中文简体**](./README.md) | [**日本語**](./docs/jp/README.ja.md) | [**한국어**](./docs/kr/README.ko.md) ([**韓國語**](./docs/kr/README.ko.han.md)) | [**Français**](./docs/fr/README.fr.md) | [**Türkçe**](./docs/tr/README.tr.md) | [**Português**](./docs/pt/README.pt.md)
</div>
> 底模使用接近50小时的开源高质量VCTK训练集训练无版权方面的顾虑请大家放心使用
> 请期待RVCv3的底模参数更大数据更大效果更好基本持平的推理速度需要训练数据量更少。
<table>
<tr>
<td align="center">训练推理界面</td>
<td align="center">实时变声界面</td>
</tr>
<tr>
<td align="center"><img src="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/assets/129054828/092e5c12-0d49-4168-a590-0b0ef6a4f630"></td>
<td align="center"><img src="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/assets/129054828/730b4114-8805-44a1-ab1a-04668f3c30a6"></td>
</tr>
<tr>
<td align="center">go-webui.bat</td>
<td align="center">go-realtime_gui.bat</td>
</tr>
<tr>
<td align="center">可以自由选择想要执行的操作。</td>
<td align="center">我们已经实现端到端170ms延迟。如使用ASIO输入输出设备已能实现端到端90ms延迟但非常依赖硬件驱动支持。</td>
</tr>
</table>
## 简介
本仓库具有以下特点
+ 使用top1检索替换输入源特征为训练集特征来杜绝音色泄漏
+ 即便在相对较差的显卡上也能快速训练
+ 使用少量数据进行训练也能得到较好结果(推荐至少收集10分钟低底噪语音数据)
+ 可以通过模型融合来改变音色(借助ckpt处理选项卡中的ckpt-merge)
+ 简单易用的网页界面
+ 可调用UVR5模型来快速分离人声和伴奏
+ 使用最先进的[人声音高提取算法InterSpeech2023-RMVPE](#参考项目)根绝哑音问题,速度快、资源占用小
+ A卡/I卡使用 CPU 依赖方案Windows 可使用 DirectMLLinux 使用 CPU
2026-07-19 21:17:17 +08:00
点此查看我们的[演示视频](https://www.bilibili.com/video/BV1pm4y1z7Gm/) !
## 环境配置
本分支面向 **Python 3.12 x64**请先进入仓库根目录。Ubuntu 推荐使用 Ubuntu 24.04 x86_64。
2026-07-19 21:17:17 +08:00
### Ubuntu 24.04
2026-07-19 21:17:17 +08:00
```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
2026-07-19 21:17:17 +08:00
```
### Windows
2026-07-19 21:17:17 +08:00
安装 Python 3.12 x64 后创建虚拟环境:
```powershell
py -3.12 -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip setuptools wheel
```
2026-07-19 21:17:17 +08:00
### 按硬件选择依赖
2026-07-19 21:17:17 +08:00
| 硬件 | 安装方式 |
| --- | --- |
| CPU、AMD、Intel | 使用 `requirments_cpu_py312.txt`Windows 可使用 DirectMLLinux 使用 CPU |
| NVIDIA RTX 50 系 | 先安装 CUDA 12.8 版 Torch再安装 `requirments_cu128_py312.txt` |
| NVIDIA RTX 50 系以前 | 先安装 CUDA 11.8 版 Torch再安装 `requirments_cu118_py312.txt` |
2026-07-19 21:17:17 +08:00
#### CPU、AMD、Intel
2026-07-19 21:17:17 +08:00
```bash
python -m pip install -r requirments_cpu_py312.txt
```
2026-07-19 21:17:17 +08:00
#### NVIDIA RTX 50 系:两阶段安装
2026-07-19 21:17:17 +08:00
```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
```
2026-07-19 21:17:17 +08:00
#### NVIDIA RTX 50 系以前:两阶段安装
2026-07-19 21:17:17 +08:00
```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
2026-07-19 21:17:17 +08:00
```
检查 Torch 与 CUDA 状态:
2026-07-19 21:17:17 +08:00
```bash
python -c "import torch; print('torch:', torch.__version__); print('cuda:', torch.version.cuda); print('cuda available:', torch.cuda.is_available())"
2026-07-19 21:17:17 +08:00
```
项目代码还会检查 NVIDIA GPU 的显存和计算能力。显存约低于 4 GiB 或计算能力低于 SM 5.3 时会使用 CPU。
### 修改下载源
三个 `requirments_*.txt` 顶部已经包含下载源。中国大陆用户可保留默认镜像;需要使用官方源时,只替换 `--index-url``--extra-index-url`保留包版本、CUDA 后缀和两阶段顺序。
| 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` |
## 模型与运行目录
WebUI 会自动创建运行目录。模型请从 [Hugging Face 模型仓库](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main) 下载,并保持以下路径:
```text
assets/
├── hubert_base/
│ ├── config.json
│ ├── preprocessor_config.json
│ └── pytorch_model.bin
├── rmvpe/rmvpe.pt
├── pretrained/
├── pretrained_v2/
├── uvr5_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/uvr5_weights/*
assets/weights/*.pth
assets/indices/*.index
logs/mute/*
```
2026-07-19 21:17:17 +08:00
### 下载模型
2026-07-19 21:17:17 +08:00
```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 UVR5 vocal separation
hf download lj1995/VoiceConversionWebUI --revision main \
--include "uvr5_weights/*" --local-dir assets
```
2026-07-19 21:17:17 +08:00
仅 Windows AMD/Intel DirectML 环境还需要:
2026-07-19 21:17:17 +08:00
```bash
hf download lj1995/VoiceConversionWebUI rmvpe.onnx --revision main \
--local-dir assets/rmvpe
```
2026-07-19 21:17:17 +08:00
`hubert_base.pt` 是旧格式;当前代码使用 `assets/hubert_base/` 下的 Transformers 三文件模型。FCPE 模型由 `torchfcpe` 包提供。
2026-07-19 21:17:17 +08:00
### FFmpeg
2026-07-19 21:17:17 +08:00
Ubuntu 已在前面的系统依赖命令中安装 FFmpeg。Windows 用户可把下面两个文件放到项目根目录:
2026-07-19 21:17:17 +08:00
- [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)
2026-07-19 21:17:17 +08:00
## 开始使用
启动 WebUI
2026-07-19 21:17:17 +08:00
```bash
python webui.py
```
无桌面的 Ubuntu 服务器:
2026-07-19 21:17:17 +08:00
```bash
python webui.py --noautoopen
2026-07-19 21:17:17 +08:00
```
默认服务监听端口为 `7865`。用户自己的 `.pth` 模型放入 `assets/weights/``.index` 文件放入 `assets/indices/`
2026-07-19 21:17:17 +08:00
## 参考项目
+ [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)
+ [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).
## 感谢所有贡献者作出的努力
<a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
<img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
</a>