optimize the structure

This commit is contained in:
Lion
2024-02-23 20:32:25 +08:00
parent 939971afe3
commit 0d88cff99e
4 changed files with 166 additions and 202 deletions

View File

@@ -17,12 +17,6 @@
---
> 查看我们的介绍视频 [demo video](https://www.bilibili.com/video/BV12g4y1m7Uw)
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
中国地区用户可使用 AutoDL 云端镜像进行体验https://www.codewithgpu.com/i/RVC-Boss/GPT-SoVITS/GPT-SoVITS-Official
## 功能:
1. **零样本文本到语音TTS** 输入 5 秒的声音样本,即刻体验文本到语音转换。
@@ -33,46 +27,29 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-
4. **WebUI 工具:** 集成工具包括声音伴奏分离、自动训练集分割、中文自动语音识别(ASR)和文本标注,协助初学者创建训练数据集和 GPT/SoVITS 模型。
## 环境准备
**查看我们的介绍视频 [demo video](https://www.bilibili.com/video/BV12g4y1m7Uw)**
如果你是 Windows 用户(已在 win>=10 上测试),可以直接通过预打包文件安装。只需下载[预打包文件](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-beta.7z?download=true),解压后双击 go-webui.bat 即可启动 GPT-SoVITS-WebUI。
未见过的说话者 few-shot 微调演示:
### 测试通过的 Python 和 PyTorch 版本
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
## 安装
中国地区用户可[点击此处](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.3.0.dev20240122 和 macOS 14.3Apple 芯片GPU
- Python 3.9、Pytorch 2.3.0.dev20240122 和 macOS 14.3Apple 芯片)
_注意: numba==0.56.4 需要 python<3.11_
### Mac 用户
### Windows
如果你是 Mac 用户,请先确保满足以下条件以使用 GPU 进行训练和推理:
如果你是 Windows 用户(已在 win>=10 上测试),可以直接下载[预打包文件](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-beta.7z?download=true),解压后双击 go-webui.bat 即可启动 GPT-SoVITS-WebUI。
- 搭载 Apple 芯片的 Mac
- macOS 12.3 或更高版本
- 已通过运行`xcode-select --install`安装 Xcode command-line tools
_其他 Mac 仅支持使用 CPU 进行推理_
然后使用以下命令安装:
#### 创建环境
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
```
#### 安装依赖
```bash
pip install -r requirements.txt
pip uninstall torch torchaudio
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
```
### 使用 Conda 快速安装
### Linux
```bash
conda create -n GPTSoVits python=3.9
@@ -80,15 +57,37 @@ conda activate GPTSoVits
bash install.sh
```
### 手动安装包
### macOS
#### Pip 包
只有符合以下条件的 Mac 可以训练模型:
- 搭载 Apple 芯片的 Mac
- 运行macOS 12.3 或更高版本
- 已通过运行`xcode-select --install`安装 Xcode command-line tools
**所有 Mac 都可使用 CPU 进行推理,且已测试性能优于 GPU。**
首先确保你已通过运行 `brew install ffmpeg``conda install ffmpeg` 安装 FFmpeg然后运行以下命令安装
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
pip install -r requirements.txt
```
_只有安装了Pytorch Nightly才可训练模型。_
### 手动安装
#### 安装依赖
```bash
pip install -r requirements.txt
```
#### FFmpeg
#### 安装 FFmpeg
##### Conda 使用者
@@ -104,12 +103,6 @@ sudo apt install libsox-dev
conda install -c conda-forge 'ffmpeg<7'
```
##### MacOS 使用者
```bash
brew install ffmpeg
```
##### 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 根目录下。
@@ -141,11 +134,11 @@ docker compose -f "docker-compose.yaml" up -d
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
```
### 预训练模型
## 预训练模型
从 [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) 下载预训练模型,并将它们放置在 `GPT_SoVITS\pretrained_models` 中。
对于 UVR5人声/伴奏分离和混响移除,另外),从 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 下载模型,并将它们放置在 `tools/uvr5/uvr5_weights` 中。
对于 UVR5人声/伴奏分离和混响移除,附加),从 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 下载模型,并将它们放置在 `tools/uvr5/uvr5_weights` 中。
中国地区用户可以进入以下链接并点击“下载副本”下载以上两个模型:
@@ -153,7 +146,7 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
- [UVR5 Weights](https://www.icloud.com.cn/iclouddrive/0bekRKDiJXboFhbfm3lM2fVbA#UVR5_Weights)
对于中文自动语音识别(另外),从 [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/damo_asr/models` 中。
对于中文自动语音识别(附加),从 [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/damo_asr/models` 中。
## 数据集格式