From c0b46314ca156c343f53dbaa8f81a481f9eff565 Mon Sep 17 00:00:00 2001
From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com>
Date: Tue, 15 Apr 2025 08:42:23 +0100
Subject: [PATCH] Support Python 3.11, Clean Docs, and Update Setup (#2290)
* Update Req, Shell Scripts and Docs
* Use half-width punctuation marks
* Update install.sh
---
README.md | 26 +++--
colab_webui.ipynb | 27 ++---
docs/cn/Changelog_CN.md | 78 +++++++-------
docs/cn/README.md | 138 +++++++++++++------------
docs/ja/Changelog_JA.md | 220 ++++++++++++++++++++--------------------
docs/ja/README.md | 128 ++++++++++++-----------
docs/ko/README.md | 20 ++--
docs/tr/README.md | 30 +++---
go-webui.bat | 2 +-
go-webui.ps1 | 2 +-
install.sh | 79 +++++++++------
requirements.txt | 14 +--
12 files changed, 396 insertions(+), 368 deletions(-)
diff --git a/README.md b/README.md
index 8be71a6..9d096d4 100644
--- a/README.md
+++ b/README.md
@@ -44,12 +44,14 @@ For users in China, you can [click here](https://www.codewithgpu.com/i/RVC-Boss/
### Tested Environments
-- Python 3.9, PyTorch 2.0.1, CUDA 11
-- Python 3.10.13, PyTorch 2.1.2, CUDA 12.3
-- Python 3.9, PyTorch 2.2.2, macOS 14.4.1 (Apple silicon)
-- Python 3.9, PyTorch 2.2.2, CPU devices
-
-_Note: numba==0.56.4 requires py<3.11_
+| Python Version | PyTorch Version | Device |
+|----------------|------------------|-----------------|
+| Python 3.9 | PyTorch 2.0.1 | CUDA 11.8 |
+| Python 3.10.13 | PyTorch 2.1.2 | CUDA 12.3 |
+| Python 3.10.17 | PyTorch 2.5.1 | CUDA 12.4 |
+| Python 3.9 | PyTorch 2.5.1 | Apple silicon |
+| Python 3.11 | PyTorch 2.6.0 | Apple silicon |
+| Python 3.9 | PyTorch 2.2.2 | CPU |
### Windows
@@ -121,11 +123,11 @@ pip install -r requirements.txt
#### docker-compose.yaml configuration
-0. Regarding image tags: Due to rapid updates in the codebase and the slow process of packaging and testing images, please check [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits) for the currently packaged latest images and select as per your situation, or alternatively, build locally using a Dockerfile according to your own needs.
-1. Environment Variables:
+0. Regarding image tags: Due to rapid updates in the codebase and the slow process of packaging and testing images, please check [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)(outdated) for the currently packaged latest images and select as per your situation, or alternatively, build locally using a Dockerfile according to your own needs.
+1. Environment Variables:
- is_half: Controls half-precision/double-precision. This is typically the cause if the content under the directories 4-cnhubert/5-wav32k is not generated correctly during the "SSL extracting" step. Adjust to True or False based on your actual situation.
-2. Volumes Configuration,The application's root directory inside the container is set to /workspace. The default docker-compose.yaml lists some practical examples for uploading/downloading content.
-3. shm_size: The default available memory for Docker Desktop on Windows is too small, which can cause abnormal operations. Adjust according to your own situation.
+2. Volumes Configuration, The application's root directory inside the container is set to /workspace. The default docker-compose.yaml lists some practical examples for uploading/downloading content.
+3. shm_size: The default available memory for Docker Desktop on Windows is too small, which can cause abnormal operations. Adjust according to your own situation.
4. Under the deploy section, GPU-related settings should be adjusted cautiously according to your system and actual circumstances.
#### Running with docker compose
@@ -144,6 +146,8 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
## Pretrained Models
+**If `install.sh` runs successfully, you may skip No.1.**
+
**Users in China can [download all these models here](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#nVNhX).**
1. Download pretrained models from [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) and place them in `GPT_SoVITS/pretrained_models`.
@@ -258,7 +262,7 @@ Use v2 from v1 environment:
3. Download v2 pretrained models from [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained) and put them into `GPT_SoVITS\pretrained_models\gsv-v2final-pretrained`.
- Chinese v2 additional: [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip)(Download G2PW models, unzip and rename to `G2PWModel`, and then place them in `GPT_SoVITS/text`.
+ Chinese v2 additional: [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip)(Download G2PW models, unzip and rename to `G2PWModel`, and then place them in `GPT_SoVITS/text`.)
## V3 Release Notes
diff --git a/colab_webui.ipynb b/colab_webui.ipynb
index 5faee51..111bd41 100644
--- a/colab_webui.ipynb
+++ b/colab_webui.ipynb
@@ -30,10 +30,11 @@
"!pip install -q condacolab\n",
"# Setting up condacolab and installing packages\n",
"import condacolab\n",
- "condacolab.install_from_url(\"https://repo.anaconda.com/miniconda/Miniconda3-py39_23.11.0-2-Linux-x86_64.sh\")\n",
+ "condacolab.install_from_url(\"https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh\")\n",
+ "\n",
"%cd -q /content\n",
"!git clone https://github.com/RVC-Boss/GPT-SoVITS\n",
- "%cd -q /content/GPT-SoVITS\n",
+ "%cd -q GPT-SoVITS\n",
"!bash install.sh"
]
},
@@ -45,22 +46,12 @@
},
"outputs": [],
"source": [
- "# @title Download pretrained models 下载预训练模型\n",
- "!mkdir -p /content/GPT-SoVITS/GPT_SoVITS/pretrained_models\n",
- "!mkdir -p /content/GPT-SoVITS/tools/damo_asr/models\n",
- "!mkdir -p /content/GPT-SoVITS/tools/uvr5\n",
- "%cd /content/GPT-SoVITS/GPT_SoVITS/pretrained_models\n",
- "!git clone https://huggingface.co/lj1995/GPT-SoVITS\n",
- "%cd /content/GPT-SoVITS/tools/damo_asr/models\n",
- "!git clone https://www.modelscope.cn/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git\n",
- "!git clone https://www.modelscope.cn/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch.git\n",
- "!git clone https://www.modelscope.cn/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch.git\n",
- "# @title UVR5 pretrains 安装uvr5模型\n",
- "%cd /content/GPT-SoVITS/tools/uvr5\n",
- "%rm -r uvr5_weights\n",
- "!git clone https://huggingface.co/Delik/uvr5_weights\n",
- "!git config core.sparseCheckout true\n",
- "!mv /content/GPT-SoVITS/GPT_SoVITS/pretrained_models/GPT-SoVITS/* /content/GPT-SoVITS/GPT_SoVITS/pretrained_models/"
+ "# @title UVR5 Pretrained Models\n",
+ "!wget https://www.modelscope.cn/models/XXXXRT/UVR5Weights4GSV/resolve/master/uvr5_weights.zip\n",
+ "!unzip uvr5_weights.zip\n",
+ "!rm -rf uvr5_weights.zip\n",
+ "!mv uvr5_weights/* tools/uvr5/uvr5_weights\n",
+ "!rm -rf uvr5_weights"
]
},
{
diff --git a/docs/cn/Changelog_CN.md b/docs/cn/Changelog_CN.md
index 58a67d3..cd1d50d 100644
--- a/docs/cn/Changelog_CN.md
+++ b/docs/cn/Changelog_CN.md
@@ -1,12 +1,12 @@
### 20240121更新
-1-config添加is_share,诸如colab等场景可以将此改为True,来使得webui映射到公网
+1-config添加is_share, 诸如colab等场景可以将此改为True, 来使得webui映射到公网
2-WebUI添加英文系统英文翻译适配
-3-cmd-asr自动判断是否已自带damo模型,如不在默认目录上将从modelscope自带下载
+3-cmd-asr自动判断是否已自带damo模型, 如不在默认目录上将从modelscope自带下载
-4-[SoVITS训练报错ZeroDivisionError](https://github.com/RVC-Boss/GPT-SoVITS/issues/79) 尝试修复(过滤长度0的样本等)
+4-[SoVITS训练报错ZeroDivisionError](https://github.com/RVC-Boss/GPT-SoVITS/issues/79) 尝试修复(过滤长度0的样本等)
5-清理TEMP文件夹缓存音频等文件
@@ -14,11 +14,11 @@
### 20240122更新
-1-修复过短输出文件返回重复参考音频的问题。
+1-修复过短输出文件返回重复参考音频的问题.
-2-经测试,英文日文训练原生支持(日文训练需要根目录不含非英文等特殊字符)。
+2-经测试, 英文日文训练原生支持(日文训练需要根目录不含非英文等特殊字符).
-3-音频路径检查。如果尝试读取输入错的路径报错路径不存在,而非ffmpeg错误。
+3-音频路径检查.如果尝试读取输入错的路径报错路径不存在, 而非ffmpeg错误.
### 20240123更新
@@ -44,7 +44,7 @@
6-支持mac训练推理
-7-自动识别不支持半精度的卡强制单精度。cpu推理下强制单精度。
+7-自动识别不支持半精度的卡强制单精度.cpu推理下强制单精度.
### 20240128更新
@@ -85,7 +85,7 @@
1-修复asr路径尾缀带/保存文件名报错
-2-引入paddlespeech的Normalizer https://github.com/RVC-Boss/GPT-SoVITS/pull/377 修复一些问题,例如:xx.xx%(带百分号类),元/吨 会读成 元吨 而不是元每吨,下划线不再会报错
+2-引入paddlespeech的Normalizer https://github.com/RVC-Boss/GPT-SoVITS/pull/377 修复一些问题, 例如: xx.xx%(带百分号类), 元/吨 会读成 元吨 而不是元每吨,下划线不再会报错
### 20240207更新
@@ -93,7 +93,7 @@
2-uvr5适配高版本librosa https://github.com/RVC-Boss/GPT-SoVITS/pull/403
-3-[修复uvr5 inf everywhere报错的问题(is_half传参未转换bool导致恒定半精度推理,16系显卡会inf)](https://github.com/RVC-Boss/GPT-SoVITS/commit/14a285109a521679f8846589c22da8f656a46ad8)
+3-[修复uvr5 inf everywhere报错的问题(is_half传参未转换bool导致恒定半精度推理, 16系显卡会inf)](https://github.com/RVC-Boss/GPT-SoVITS/commit/14a285109a521679f8846589c22da8f656a46ad8)
4-优化英文文本前端
@@ -105,19 +105,19 @@
### 20240208更新
-1-GPT训练卡死(win10 1909)和https://github.com/RVC-Boss/GPT-SoVITS/issues/232 (系统语言繁体)GPT训练报错,[尝试修复](https://github.com/RVC-Boss/GPT-SoVITS/commit/59f35adad85815df27e9c6b33d420f5ebfd8376b)。
+1-GPT训练卡死 (win10 1909) 和https://github.com/RVC-Boss/GPT-SoVITS/issues/232 (系统语言繁体) GPT训练报错, [尝试修复](https://github.com/RVC-Boss/GPT-SoVITS/commit/59f35adad85815df27e9c6b33d420f5ebfd8376b).
### 20240212更新
-1-faster whisper和funasr逻辑优化。faster whisper转镜像站下载,规避huggingface连不上的问题。
+1-faster whisper和funasr逻辑优化.faster whisper转镜像站下载, 规避huggingface连不上的问题.
-2-DPO Loss实验性训练选项开启,通过构造负样本训练缓解GPT重复漏字问题。推理界面公开几个推理参数。 https://github.com/RVC-Boss/GPT-SoVITS/pull/457
+2-DPO Loss实验性训练选项开启, 通过构造负样本训练缓解GPT重复漏字问题.推理界面公开几个推理参数. https://github.com/RVC-Boss/GPT-SoVITS/pull/457
### 20240214更新
-1-训练支持中文实验名(原来会报错)
+1-训练支持中文实验名 (原来会报错)
-2-DPO训练改为可勾选选项而非必须。如勾选batch size自动减半。修复推理界面新参数不传参的问题。
+2-DPO训练改为可勾选选项而非必须.如勾选batch size自动减半.修复推理界面新参数不传参的问题.
### 20240216更新
@@ -127,7 +127,7 @@
### 20240221更新
-1-数据处理添加语音降噪选项(降噪为只剩16k采样率,除非底噪很大先不急着用哦。)
+1-数据处理添加语音降噪选项 (降噪为只剩16k采样率, 除非底噪很大先不急着用哦).
2-中文日文前端处理优化 https://github.com/RVC-Boss/GPT-SoVITS/pull/559 https://github.com/RVC-Boss/GPT-SoVITS/pull/556 https://github.com/RVC-Boss/GPT-SoVITS/pull/532 https://github.com/RVC-Boss/GPT-SoVITS/pull/507 https://github.com/RVC-Boss/GPT-SoVITS/pull/509
@@ -137,7 +137,7 @@
### 20240306更新
-1-推理加速50%(RTX3090+pytorch2.2.1+cu11.8+win10+py39 tested)https://github.com/RVC-Boss/GPT-SoVITS/pull/672
+1-推理加速50% (RTX3090+pytorch2.2.1+cu11.8+win10+py39 tested) https://github.com/RVC-Boss/GPT-SoVITS/pull/672
2-如果用faster whisper非中文ASR不再需要先下中文funasr模型
@@ -151,7 +151,7 @@
2个重点
-1-修复sovits训练未冻结vq的问题(可能造成效果下降)
+1-修复sovits训练未冻结vq的问题 (可能造成效果下降)
2-增加一个快速推理分支
@@ -171,21 +171,21 @@
### 20240610
-小问题修复:
+小问题修复:
1-完善纯标点、多标点文本输入的判断逻辑 https://github.com/RVC-Boss/GPT-SoVITS/pull/1168 https://github.com/RVC-Boss/GPT-SoVITS/pull/1169
-2-uvr5中的mdxnet去混响cmd格式修复,兼容路径带空格 [#501a74a](https://github.com/RVC-Boss/GPT-SoVITS/commit/501a74ae96789a26b48932babed5eb4e9483a232)
+2-uvr5中的mdxnet去混响cmd格式修复, 兼容路径带空格 [#501a74a](https://github.com/RVC-Boss/GPT-SoVITS/commit/501a74ae96789a26b48932babed5eb4e9483a232)
3-s2训练进度条逻辑修复 https://github.com/RVC-Boss/GPT-SoVITS/pull/1159
-大问题修复:
+大问题修复:
-4-修复了webui的GPT中文微调没读到bert导致和推理不一致,训练太多可能效果还会变差的问题。如果大量数据微调的建议重新微调模型得到质量优化 [#99f09c8](https://github.com/RVC-Boss/GPT-SoVITS/commit/99f09c8bdc155c1f4272b511940717705509582a)
+4-修复了webui的GPT中文微调没读到bert导致和推理不一致, 训练太多可能效果还会变差的问题.如果大量数据微调的建议重新微调模型得到质量优化 [#99f09c8](https://github.com/RVC-Boss/GPT-SoVITS/commit/99f09c8bdc155c1f4272b511940717705509582a)
### 20240706
-小问题修复:
+小问题修复:
1-[修正CPU推理默认bs小数](https://github.com/RVC-Boss/GPT-SoVITS/commit/db50670598f0236613eefa6f2d5a23a271d82041)
@@ -197,9 +197,9 @@
5-移除冗余my_utils https://github.com/RVC-Boss/GPT-SoVITS/pull/1251
-重点:
+重点:
-6-倍速推理代码经过验证后推理效果和base完全一致,合并进main。使用的代码:https://github.com/RVC-Boss/GPT-SoVITS/pull/672 。支持无参考文本模式也倍速。
+6-倍速推理代码经过验证后推理效果和base完全一致, 合并进main.使用的代码: https://github.com/RVC-Boss/GPT-SoVITS/pull/672 .支持无参考文本模式也倍速.
后面会逐渐验证快速推理分支的推理改动的一致性
@@ -211,20 +211,20 @@
3-修复GPT训练的step计算逻辑 https://github.com/RVC-Boss/GPT-SoVITS/pull/756
-重点:
+重点:
-4-[支持合成语速调节。支持冻结随机性只调节语速,](https://github.com/RVC-Boss/GPT-SoVITS/commit/9588a3c52d9ebdb20b3c5d74f647d12e7c1171c2)并将其更新到api.py上https://github.com/RVC-Boss/GPT-SoVITS/pull/1340
+4-[支持合成语速调节.支持冻结随机性只调节语速, ](https://github.com/RVC-Boss/GPT-SoVITS/commit/9588a3c52d9ebdb20b3c5d74f647d12e7c1171c2)并将其更新到api.py上https://github.com/RVC-Boss/GPT-SoVITS/pull/1340
### 20240806
-1-增加bs-roformer人声伴奏分离模型支持。 https://github.com/RVC-Boss/GPT-SoVITS/pull/1306 https://github.com/RVC-Boss/GPT-SoVITS/pull/1356 [支持fp16推理。](https://github.com/RVC-Boss/GPT-SoVITS/commit/e62e965323a60a76a025bcaa45268c1ddcbcf05c)
+1-增加bs-roformer人声伴奏分离模型支持. https://github.com/RVC-Boss/GPT-SoVITS/pull/1306 https://github.com/RVC-Boss/GPT-SoVITS/pull/1356 [支持fp16推理.](https://github.com/RVC-Boss/GPT-SoVITS/commit/e62e965323a60a76a025bcaa45268c1ddcbcf05c)
-2-更好的中文文本前端。 https://github.com/RVC-Boss/GPT-SoVITS/pull/987 https://github.com/RVC-Boss/GPT-SoVITS/pull/1351 https://github.com/RVC-Boss/GPT-SoVITS/pull/1404 优化多音字逻辑(v2版本特供)。 https://github.com/RVC-Boss/GPT-SoVITS/pull/488
+2-更好的中文文本前端. https://github.com/RVC-Boss/GPT-SoVITS/pull/987 https://github.com/RVC-Boss/GPT-SoVITS/pull/1351 https://github.com/RVC-Boss/GPT-SoVITS/pull/1404 优化多音字逻辑 (v2版本特供). https://github.com/RVC-Boss/GPT-SoVITS/pull/488
3-自动填充下一步的文件路径 https://github.com/RVC-Boss/GPT-SoVITS/pull/1355
-4-增加喂饭逻辑,用户瞎写显卡序号也可以正常运作 [bce451a](https://github.com/RVC-Boss/GPT-SoVITS/commit/bce451a2d1641e581e200297d01f219aeaaf7299) [4c8b761](https://github.com/RVC-Boss/GPT-SoVITS/commit/4c8b7612206536b8b4435997acb69b25d93acb78)
+4-增加喂饭逻辑, 用户瞎写显卡序号也可以正常运作 [bce451a](https://github.com/RVC-Boss/GPT-SoVITS/commit/bce451a2d1641e581e200297d01f219aeaaf7299) [4c8b761](https://github.com/RVC-Boss/GPT-SoVITS/commit/4c8b7612206536b8b4435997acb69b25d93acb78)
5-增加粤语ASR支持 [8a10147](https://github.com/RVC-Boss/GPT-SoVITS/commit/8a101474b5a4f913b4c94fca2e3ca87d0771bae3)
@@ -234,11 +234,11 @@
### 20240821
-1-fast_inference分支合并进main:https://github.com/RVC-Boss/GPT-SoVITS/pull/1490
+1-fast_inference分支合并进main: https://github.com/RVC-Boss/GPT-SoVITS/pull/1490
-2-支持通过ssml标签优化数字、电话、时间日期等:https://github.com/RVC-Boss/GPT-SoVITS/issues/1508
+2-支持通过ssml标签优化数字、电话、时间日期等: https://github.com/RVC-Boss/GPT-SoVITS/issues/1508
-3-api修复优化:https://github.com/RVC-Boss/GPT-SoVITS/pull/1503
+3-api修复优化: https://github.com/RVC-Boss/GPT-SoVITS/pull/1503
4-修复了参考音频混合只能上传一条的bug:https://github.com/RVC-Boss/GPT-SoVITS/pull/1422
@@ -246,11 +246,11 @@
### 20250211
-增加gpt-sovits-v3模型,需要14G显存可以微调
+增加gpt-sovits-v3模型, 需要14G显存可以微调
### 20250212
-sovits-v3微调支持开启梯度检查点,需要12G显存可以微调https://github.com/RVC-Boss/GPT-SoVITS/pull/2040
+sovits-v3微调支持开启梯度检查点, 需要12G显存可以微调https://github.com/RVC-Boss/GPT-SoVITS/pull/2040
### 20250214
@@ -266,7 +266,7 @@ sovits-v3微调支持开启梯度检查点,需要12G显存可以微调https://
### 20250223
-1-sovits-v3微调支持lora训练,需要8G显存可以微调,效果比全参微调更好
+1-sovits-v3微调支持lora训练, 需要8G显存可以微调, 效果比全参微调更好
2-人声背景音分离增加mel band roformer模型支持https://github.com/RVC-Boss/GPT-SoVITS/pull/2078
@@ -274,11 +274,11 @@ sovits-v3微调支持开启梯度检查点,需要12G显存可以微调https://
https://github.com/RVC-Boss/GPT-SoVITS/pull/2112 https://github.com/RVC-Boss/GPT-SoVITS/pull/2114
-修复中文路径下mecab的报错(具体表现为日文韩文、文本混合语种切分可能会遇到的报错)
+修复中文路径下mecab的报错 (具体表现为日文韩文、文本混合语种切分可能会遇到的报错)
### 20250227
-针对v3生成24k音频感觉闷的问题https://github.com/RVC-Boss/GPT-SoVITS/issues/2085 https://github.com/RVC-Boss/GPT-SoVITS/issues/2117 ,支持使用24k to 48k的音频超分模型缓解。
+针对v3生成24k音频感觉闷的问题https://github.com/RVC-Boss/GPT-SoVITS/issues/2085 https://github.com/RVC-Boss/GPT-SoVITS/issues/2117 ,支持使用24k to 48k的音频超分模型缓解.
### 20250228
@@ -295,8 +295,8 @@ https://github.com/RVC-Boss/GPT-SoVITS/pull/2112 https://github.com/RVC-Boss/GPT
修复其他若干bug
-重点更新:
+重点更新:
1-v3支持并行推理 https://github.com/RVC-Boss/GPT-SoVITS/commit/03b662a769946b7a6a8569a354860e8eeeb743aa
-2-整合包修复onnxruntime GPU推理的支持,影响:(1)g2pw有个onnx模型原先是CPU推理现在用GPU,显著降低推理的CPU瓶颈 (2)foxjoy去混响模型现在可使用GPU推理
+2-整合包修复onnxruntime GPU推理的支持, 影响: (1) g2pw有个onnx模型原先是CPU推理现在用GPU, 显著降低推理的CPU瓶颈 (2) foxjoy去混响模型现在可使用GPU推理
diff --git a/docs/cn/README.md b/docs/cn/README.md
index c6738cd..e3b075e 100644
--- a/docs/cn/README.md
+++ b/docs/cn/README.md
@@ -1,7 +1,7 @@
GPT-SoVITS-WebUI
-强大的少样本语音转换与语音合成Web用户界面。
+强大的少样本语音转换与语音合成Web用户界面.
[](https://github.com/RVC-Boss/GPT-SoVITS)
@@ -20,19 +20,19 @@
---
-## 功能:
+## 功能:
-1. **零样本文本到语音(TTS):** 输入 5 秒的声音样本,即刻体验文本到语音转换。
+1. **零样本文本到语音 (TTS): ** 输入 5 秒的声音样本, 即刻体验文本到语音转换.
-2. **少样本 TTS:** 仅需 1 分钟的训练数据即可微调模型,提升声音相似度和真实感。
+2. **少样本 TTS: ** 仅需 1 分钟的训练数据即可微调模型, 提升声音相似度和真实感.
-3. **跨语言支持:** 支持与训练数据集不同语言的推理,目前支持英语、日语、韩语、粤语和中文。
+3. **跨语言支持: ** 支持与训练数据集不同语言的推理, 目前支持英语、日语、韩语、粤语和中文.
-4. **WebUI 工具:** 集成工具包括声音伴奏分离、自动训练集分割、中文自动语音识别(ASR)和文本标注,协助初学者创建训练数据集和 GPT/SoVITS 模型。
+4. **WebUI 工具: ** 集成工具包括声音伴奏分离、自动训练集分割、中文自动语音识别(ASR)和文本标注, 协助初学者创建训练数据集和 GPT/SoVITS 模型.
**查看我们的介绍视频 [demo video](https://www.bilibili.com/video/BV12g4y1m7Uw)**
-未见过的说话者 few-shot 微调演示:
+未见过的说话者 few-shot 微调演示:
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
@@ -40,22 +40,24 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-
## 安装
-中国地区的用户可[点击此处](https://www.codewithgpu.com/i/RVC-Boss/GPT-SoVITS/GPT-SoVITS-Official)使用 AutoDL 云端镜像进行体验。
+中国地区的用户可[点击此处](https://www.codewithgpu.com/i/RVC-Boss/GPT-SoVITS/GPT-SoVITS-Official)使用 AutoDL 云端镜像进行体验.
### 测试通过的环境
-- Python 3.9,PyTorch 2.0.1,CUDA 11
-- Python 3.10.13,PyTorch 2.1.2,CUDA 12.3
-- Python 3.9,Pytorch 2.2.2,macOS 14.4.1(Apple 芯片)
-- Python 3.9,PyTorch 2.2.2,CPU 设备
-
-_注: numba==0.56.4 需要 python<3.11_
+| Python Version | PyTorch Version | Device |
+|----------------|------------------|-----------------|
+| Python 3.9 | PyTorch 2.0.1 | CUDA 11.8 |
+| Python 3.10.13 | PyTorch 2.1.2 | CUDA 12.3 |
+| Python 3.10.17 | PyTorch 2.5.1 | CUDA 12.4 |
+| Python 3.9 | PyTorch 2.5.1 | Apple silicon |
+| Python 3.11 | PyTorch 2.6.0 | Apple silicon |
+| Python 3.9 | PyTorch 2.2.2 | CPU |
### Windows
-如果你是 Windows 用户(已在 win>=10 上测试),可以下载[整合包](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-v3lora-20250228.7z?download=true),解压后双击 go-webui.bat 即可启动 GPT-SoVITS-WebUI。
+如果你是 Windows 用户 (已在 win>=10 上测试), 可以下载[整合包](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-v3lora-20250228.7z?download=true), 解压后双击 go-webui.bat 即可启动 GPT-SoVITS-WebUI.
-**中国地区的用户可以[在此处下载整合包](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#KTvnO)。**
+**中国地区的用户可以[在此处下载整合包](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#KTvnO).**
### Linux
@@ -67,11 +69,11 @@ bash install.sh
### macOS
-**注:在 Mac 上使用 GPU 训练的模型效果显著低于其他设备训练的模型,所以我们暂时使用 CPU 进行训练。**
+**注: 在 Mac 上使用 GPU 训练的模型效果显著低于其他设备训练的模型, 所以我们暂时使用 CPU 进行训练.**
-1. 运行 `xcode-select --install` 安装 Xcode command-line tools。
-2. 运行 `brew install ffmpeg` 安装 FFmpeg。
-3. 完成上述步骤后,运行以下的命令来安装本项目:
+1. 运行 `xcode-select --install` 安装 Xcode command-line tools.
+2. 运行 `brew install ffmpeg` 安装 FFmpeg.
+3. 完成上述步骤后, 运行以下的命令来安装本项目:
```bash
conda create -n GPTSoVits python=3.9
@@ -100,7 +102,7 @@ conda install -c conda-forge 'ffmpeg<7'
##### Windows 用户
-下载并将 [ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe) 和 [ffprobe.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe) 放置在 GPT-SoVITS 根目录下。
+下载并将 [ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe) 和 [ffprobe.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe) 放置在 GPT-SoVITS 根目录下.
安装 [Visual Studio 2017](https://aka.ms/vs/17/release/vc_redist.x86.exe) 环境(仅限韩语 TTS)
@@ -121,14 +123,14 @@ pip install -r requirements.txt
#### docker-compose.yaml 设置
-0. image 的标签:由于代码库更新很快,镜像的打包和测试又很慢,所以请自行在 [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits) 查看当前打包好的最新的镜像并根据自己的情况选用,或者在本地根据您自己的需求通过 Dockerfile 进行构建。
-1. 环境变量:
+0. image 的标签: 由于代码库更新很快, 镜像的打包和测试又很慢, 所以请自行在 [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)(旧版本) 查看当前打包好的最新的镜像并根据自己的情况选用, 或者在本地根据您自己的需求通过 Dockerfile 进行构建.
+1. 环境变量:
-- is_half: 半精度/双精度控制。在进行 "SSL extracting" 步骤时如果无法正确生成 4-cnhubert/5-wav32k 目录下的内容时,一般都是它引起的,可以根据实际情况来调整为 True 或者 False。
+- is_half: 半精度/双精度控制.在进行 "SSL extracting" 步骤时如果无法正确生成 4-cnhubert/5-wav32k 目录下的内容时, 一般都是它引起的, 可以根据实际情况来调整为 True 或者 False.
-2. Volume 设置,容器内的应用根目录设置为 /workspace。 默认的 docker-compose.yaml 中列出了一些实际的例子,便于上传/下载内容。
-3. shm_size:Windows 下的 Docker Desktop 默认可用内存过小,会导致运行异常,根据自己情况酌情设置。
-4. deploy 小节下的 gpu 相关内容,请根据您的系统和实际情况酌情设置。
+2. Volume 设置, 容器内的应用根目录设置为 /workspace. 默认的 docker-compose.yaml 中列出了一些实际的例子, 便于上传/下载内容.
+3. shm_size: Windows 下的 Docker Desktop 默认可用内存过小, 会导致运行异常, 根据自己情况酌情设置.
+4. deploy 小节下的 gpu 相关内容, 请根据您的系统和实际情况酌情设置.
#### 通过 docker compose 运行
@@ -138,7 +140,7 @@ docker compose -f "docker-compose.yaml" up -d
#### 通过 docker 命令运行
-同上,根据您自己的实际情况修改对应的参数,然后运行如下命令:
+同上, 根据您自己的实际情况修改对应的参数, 然后运行如下命令:
```
docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-DockerTest\output:/workspace/output --volume=G:\GPT-SoVITS-DockerTest\logs:/workspace/logs --volume=G:\GPT-SoVITS-DockerTest\SoVITS_weights:/workspace/SoVITS_weights --workdir=/workspace -p 9880:9880 -p 9871:9871 -p 9872:9872 -p 9873:9873 -p 9874:9874 --shm-size="16G" -d breakstring/gpt-sovits:xxxxx
@@ -146,31 +148,33 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
## 预训练模型
-**中国地区的用户可以[在此处下载这些模型](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#nVNhX)。**
+**若成功运行`install.sh`可跳过 No.1**
+
+**中国地区的用户可以[在此处下载这些模型](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#nVNhX).**
-1. 从 [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) 下载预训练模型,并将其放置在 `GPT_SoVITS/pretrained_models` 目录中。
+1. 从 [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) 下载预训练模型, 并将其放置在 `GPT_SoVITS/pretrained_models` 目录中.
-2. 从 [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) 下载模型,解压并重命名为 `G2PWModel`,然后将其放置在 `GPT_SoVITS/text` 目录中。(仅限中文 TTS)
+2. 从 [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) 下载模型, 解压并重命名为 `G2PWModel`, 然后将其放置在 `GPT_SoVITS/text` 目录中. (仅限中文 TTS)
-3. 对于 UVR5(人声/伴奏分离和混响移除,额外功能),从 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 下载模型,并将其放置在 `tools/uvr5/uvr5_weights` 目录中。
+3. 对于 UVR5 (人声/伴奏分离和混响移除, 额外功能), 从 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 下载模型, 并将其放置在 `tools/uvr5/uvr5_weights` 目录中.
- - 如果你在 UVR5 中使用 `bs_roformer` 或 `mel_band_roformer`模型,你可以手动下载模型和相应的配置文件,并将它们放在 `tools/UVR5/UVR5_weights` 中。**重命名模型文件和配置文件,确保除后缀外**,模型和配置文件具有相同且对应的名称。此外,模型和配置文件名**必须包含“roformer”**,才能被识别为 roformer 类的模型。
+ - 如果你在 UVR5 中使用 `bs_roformer` 或 `mel_band_roformer`模型, 你可以手动下载模型和相应的配置文件, 并将它们放在 `tools/UVR5/UVR5_weights` 中.**重命名模型文件和配置文件, 确保除后缀外**, 模型和配置文件具有相同且对应的名称.此外, 模型和配置文件名**必须包含"roformer"**, 才能被识别为 roformer 类的模型.
- - 建议在模型名称和配置文件名中**直接指定模型类型**,例如`mel_mand_roformer`、`bs_roformer`。如果未指定,将从配置文中比对特征,以确定它是哪种类型的模型。例如,模型`bs_roformer_ep_368_sdr_12.9628.ckpt` 和对应的配置文件`bs_roformer_ep_368_sdr_12.9628.yaml` 是一对。`kim_mel_band_roformer.ckpt` 和 `kim_mel_band_roformer.yaml` 也是一对。
+ - 建议在模型名称和配置文件名中**直接指定模型类型**, 例如`mel_mand_roformer`、`bs_roformer`.如果未指定, 将从配置文中比对特征, 以确定它是哪种类型的模型.例如, 模型`bs_roformer_ep_368_sdr_12.9628.ckpt` 和对应的配置文件`bs_roformer_ep_368_sdr_12.9628.yaml` 是一对.`kim_mel_band_roformer.ckpt` 和 `kim_mel_band_roformer.yaml` 也是一对.
-4. 对于中文 ASR(额外功能),从 [Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files)、[Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files) 和 [Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files) 下载模型,并将它们放置在 `tools/asr/models` 目录中。
+4. 对于中文 ASR (额外功能), 从 [Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files)、[Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files) 和 [Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files) 下载模型, 并将它们放置在 `tools/asr/models` 目录中.
-5. 对于英语或日语 ASR(额外功能),从 [Faster Whisper Large V3](https://huggingface.co/Systran/faster-whisper-large-v3) 下载模型,并将其放置在 `tools/asr/models` 目录中。此外,[其他模型](https://huggingface.co/Systran) 可能具有类似效果且占用更少的磁盘空间。
+5. 对于英语或日语 ASR (额外功能), 从 [Faster Whisper Large V3](https://huggingface.co/Systran/faster-whisper-large-v3) 下载模型, 并将其放置在 `tools/asr/models` 目录中.此外, [其他模型](https://huggingface.co/Systran) 可能具有类似效果且占用更少的磁盘空间.
## 数据集格式
-文本到语音(TTS)注释 .list 文件格式:
+文本到语音 (TTS) 注释 .list 文件格式:
```
vocal_path|speaker_name|language|text
```
-语言字典:
+语言字典:
- 'zh': 中文
- 'ja': 日语
@@ -178,10 +182,10 @@ vocal_path|speaker_name|language|text
- 'ko': 韩语
- 'yue': 粤语
-示例:
+示例:
```
-D:\GPT-SoVITS\xxx/xxx.wav|xxx|zh|我爱玩原神。
+D:\GPT-SoVITS\xxx/xxx.wav|xxx|zh|我爱玩原神.
```
## 微调与推理
@@ -248,7 +252,7 @@ python webui.py
3. 底模由 2k 小时扩展至 5k 小时
-4. 对低音质参考音频(尤其是来源于网络的高频严重缺失、听着很闷的音频)合成出来音质更好
+4. 对低音质参考音频 (尤其是来源于网络的高频严重缺失、听着很闷的音频) 合成出来音质更好
详见[wiki](
)
@@ -260,15 +264,15 @@ python webui.py
3. 需要从[huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained) 下载预训练模型文件放到 GPT_SoVITS\pretrained_models\gsv-v2final-pretrained 下
- 中文额外需要下载[G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip)(下载 G2PW 模型,解压并重命名为`G2PWModel`,将其放到`GPT_SoVITS/text`目录下)
+ 中文额外需要下载[G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) (下载 G2PW 模型,解压并重命名为`G2PWModel`,将其放到`GPT_SoVITS/text`目录下)
## V3 更新说明
新模型特点:
-1. 音色相似度更像,需要更少训练集来逼近本人(不训练直接使用底模模式下音色相似性提升更大)
+1. 音色相似度更像, 需要更少训练集来逼近本人 (不训练直接使用底模模式下音色相似性提升更大)
-2. GPT 合成更稳定,重复漏字更少,也更容易跑出丰富情感
+2. GPT 合成更稳定, 重复漏字更少, 也更容易跑出丰富情感
详见[wiki]()
@@ -280,29 +284,29 @@ python webui.py
3. 从[huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main)下载这些 v3 新增预训练模型 (s1v3.ckpt, s2Gv3.pth and models--nvidia--bigvgan_v2_24khz_100band_256x folder)将他们放到`GPT_SoVITS\pretrained_models`目录下
- 如果想用音频超分功能缓解 v3 模型生成 24k 音频觉得闷的问题,需要下载额外的模型参数,参考[how to download](../../tools/AP_BWE_main/24kto48k/readme.txt)
+ 如果想用音频超分功能缓解 v3 模型生成 24k 音频觉得闷的问题, 需要下载额外的模型参数, 参考[how to download](../../tools/AP_BWE_main/24kto48k/readme.txt)
## 待办事项清单
-- [x] **高优先级:**
+- [x] **高优先级: **
- - [x] 日语和英语的本地化。
- - [x] 用户指南。
- - [x] 日语和英语数据集微调训练。
+ - [x] 日语和英语的本地化.
+ - [x] 用户指南.
+ - [x] 日语和英语数据集微调训练.
- [ ] **功能:**
- - [x] 零样本声音转换(5 秒)/ 少样本声音转换(1 分钟)。
- - [x] TTS 语速控制。
- - [ ] ~~增强的 TTS 情感控制。~~
- - [ ] 尝试将 SoVITS 令牌输入更改为词汇的概率分布。
- - [x] 改进英语和日语文本前端。
- - [ ] 开发体积小和更大的 TTS 模型。
- - [x] Colab 脚本。
- - [x] 扩展训练数据集(从 2k 小时到 10k 小时)。
- - [x] 更好的 sovits 基础模型(增强的音频质量)。
- - [ ] 模型混合。
-
-## (附加)命令行运行方式
+ - [x] 零样本声音转换 (5 秒) / 少样本声音转换 (1 分钟).
+ - [x] TTS 语速控制.
+ - [ ] ~~增强的 TTS 情感控制.~~
+ - [ ] 尝试将 SoVITS 令牌输入更改为词汇的概率分布.
+ - [x] 改进英语和日语文本前端.
+ - [ ] 开发体积小和更大的 TTS 模型.
+ - [x] Colab 脚本.
+ - [x] 扩展训练数据集 (从 2k 小时到 10k 小时).
+ - [x] 更好的 sovits 基础模型 (增强的音频质量).
+ - [ ] 模型混合.
+
+## (附加) 命令行运行方式
使用命令行打开 UVR5 的 WebUI
@@ -310,7 +314,7 @@ python webui.py
python tools/uvr5/webui.py ""
```
-
@@ -327,15 +331,15 @@ python audio_slicer.py \
--hop_size
```
-这是使用命令行完成数据集 ASR 处理的方式(仅限中文)
+这是使用命令行完成数据集 ASR 处理的方式 (仅限中文)
```
python tools/asr/funasr_asr.py -i -o