diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index f83ee1eb..2d909c94 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -241,7 +241,7 @@ jobs: run: | sudo apt-get update && sudo apt-get install -y jq - TOKEN=$(curl -s -u $DOCKER_HUB_USERNAME:$DOCKER_HUB_TOKEN" \ + TOKEN=$(curl -s -u $DOCKER_HUB_USERNAME:$DOCKER_HUB_TOKEN \ "https://auth.docker.io/token?service=registry.docker.io&scope=repository:xxxxrt666/gpt-sovits:pull,push,delete" \ | jq -r .token) diff --git a/Dockerfile b/Dockerfile index edf63a4f..e4d7185a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,9 @@ EXPOSE 9871 9872 9873 9874 9880 ENV PYTHONPATH="/workspace/GPT-SoVITS" +RUN conda init bash && echo "conda activate base" >> ~/.bashrc + CMD ["/bin/bash", "-c", "\ - source $HOME/anaconda3/etc/profile.d/conda.sh && \ rm -rf /workspace/GPT-SoVITS/GPT_SoVITS/pretrained_models && \ rm -rf /workspace/GPT-SoVITS/tools/asr/models && \ rm -rf /workspace/GPT-SoVITS/tools/uvr5/uvr5_weights && \ diff --git a/README.md b/README.md index 463649ac..5495a142 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,15 @@ For users in China, you can [click here](https://www.codewithgpu.com/i/RVC-Boss/ ### Tested Environments -| 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 | -| Python 3.9 | PyTorch 2.8.0dev | CUDA12.8(for Nvidia50x0) | +| 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.8.0dev | CUDA12.8 (for sm120) | +| 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 @@ -118,29 +118,51 @@ pip install -r extra-req.txt --no-deps pip install -r requirements.txt ``` -### Using Docker +### Running GPT-SoVITS with Docker -#### docker-compose.yaml configuration +#### Docker Image Selection -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. -4. Under the deploy section, GPU-related settings should be adjusted cautiously according to your system and actual circumstances. +Due to rapid development in the codebase and a slower Docker image release cycle, please: -#### Running with docker compose +- Check [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) for the latest available image tags. +- Choose an appropriate image tag for your environment. +- Optionally, build the image locally using the provided Dockerfile for the most up-to-date changes. -``` -docker compose -f "docker-compose.yaml" up -d +#### Environment Variables + +- `is_half`: Controls whether half-precision (fp16) is enabled. Set to `true` if your GPU supports it to reduce memory usage. + +#### Shared Memory Configuration + +On Windows (Docker Desktop), the default shared memory size is small and may cause unexpected behavior. Increase `shm_size` (e.g., to `16g`) in your Docker Compose file based on your available system memory. + +#### Choosing a Service + +The `docker-compose.yaml` defines two services: + +- `GPT-SoVITS-CU124` & `GPT-SoVITS-CU128`: Full version with all features. +- `GPT-SoVITS-CU124-Lite` & `GPT-SoVITS-CU128-Lite`: Lightweight version with reduced dependencies and functionality. + +To run a specific service with Docker Compose, use: + +```bash +docker compose run --service-ports ``` -#### Running with docker command +#### Building the Docker Image Locally -As above, modify the corresponding parameters based on your actual situation, then run the following command: +If you want to build the image yourself, use: +```bash +bash docker_build.sh --cuda <12.4|12.8> [--lite] ``` -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 + +#### Accessing the Running Container (Bash Shell) + +Once the container is running in the background, you can access it using: + +```bash +docker exec -it bash ``` ## Pretrained Models @@ -168,7 +190,9 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker The TTS annotation .list file format: ``` + vocal_path|speaker_name|language|text + ``` Language dictionary: @@ -182,7 +206,9 @@ Language dictionary: Example: ``` + D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin. + ``` ## Finetune and inference @@ -212,12 +238,12 @@ Or maunally switch version in WebUI #### Path Auto-filling is now supported - 1. Fill in the audio path - 2. Slice the audio into small chunks - 3. Denoise(optinal) - 4. ASR - 5. Proofreading ASR transcriptions - 6. Go to the next Tab, then finetune the model +1. Fill in the audio path +2. Slice the audio into small chunks +3. Denoise(optinal) +4. ASR +5. Proofreading ASR transcriptions +6. Go to the next Tab, then finetune the model ### Open Inference WebUI @@ -322,7 +348,7 @@ Use v4 from v1/v2/v3 environment: Use the command line to open the WebUI for UVR5 -``` +```bash python tools/uvr5/webui.py "" ``` @@ -333,7 +359,7 @@ python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level -- This is how the audio segmentation of the dataset is done using the command line -``` +```bash python audio_slicer.py \ --input_path "" \ --output_root "" \ @@ -345,7 +371,7 @@ python audio_slicer.py \ This is how dataset ASR processing is done using the command line(Only Chinese) -``` +```bash python tools/asr/funasr_asr.py -i -o ``` @@ -353,7 +379,7 @@ ASR processing is performed through Faster_Whisper(ASR marking except Chinese) (No progress bars, GPU performance may cause time delays) -``` +```bash python ./tools/asr/fasterwhisper_asr.py -i -o -l -p ``` diff --git a/docker-compose.yaml b/docker-compose.yaml index 28ef3a63..f519cef3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,9 +1,9 @@ version: "3.8" services: - GPT-SoVITS: - image: xxxxrt666/gpt-sovits:latest - container_name: GPT-SoVITS + GPT-SoVITS-CU124: + image: xxxxrt666/gpt-sovits:latest-cu124 + container_name: GPT-SoVITS-CU124 ports: - "9871:9871" - "9872:9872" @@ -22,9 +22,51 @@ services: shm_size: "16g" restart: unless-stopped runtime: nvidia - GPT-SoVITS-Lite: - image: xxxxrt666/gpt-sovits:latest-lite - container_name: GPT-SoVITS-Lite + GPT-SoVITS-CU124-Lite: + image: xxxxrt666/gpt-sovits:latest-cu124-lite + container_name: GPT-SoVITS-CU124-Lite + ports: + - "9871:9871" + - "9872:9872" + - "9873:9873" + - "9874:9874" + - "9880:9880" + volumes: + - .:/workspace/GPT-SoVITS + - /dev/null:/workspace/GPT-SoVITS/pretrained_models + - /dev/null:/workspace/tools/asr/models + - /dev/null:/workspace/tools/uvr5/uvr5_weights + environment: + - is_half=true + tty: true + stdin_open: true + shm_size: "16g" + restart: unless-stopped + runtime: nvidia + GPT-SoVITS-CU128: + image: xxxxrt666/gpt-sovits:latest-cu128 + container_name: GPT-SoVITS-CU128 + ports: + - "9871:9871" + - "9872:9872" + - "9873:9873" + - "9874:9874" + - "9880:9880" + volumes: + - .:/workspace/GPT-SoVITS + - /dev/null:/workspace/GPT-SoVITS/pretrained_models + - /dev/null:/workspace/tools/asr/models + - /dev/null:/workspace/tools/uvr5/uvr5_weights + environment: + - is_half=true + tty: true + stdin_open: true + shm_size: "16g" + restart: unless-stopped + runtime: nvidia + GPT-SoVITS-CU128-Lite: + image: xxxxrt666/gpt-sovits:latest-cu128-lite + container_name: GPT-SoVITS-CU128-Lite ports: - "9871:9871" - "9872:9872" diff --git a/docs/cn/README.md b/docs/cn/README.md index cc72b893..097ee9a5 100644 --- a/docs/cn/README.md +++ b/docs/cn/README.md @@ -20,21 +20,21 @@ --- -## 功能: +## 功能 -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 + **用户手册: [简体中文](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e) | [English](https://rentry.co/GPT-SoVITS-guide#/)** @@ -44,14 +44,15 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350- ### 测试通过的环境 -| 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 | +| 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.8.0dev | CUDA12.8 (for sm120) | +| 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 @@ -72,7 +73,7 @@ bash install.sh --source [--download-uvr5] **注: 在 Mac 上使用 GPU 训练的模型效果显著低于其他设备训练的模型, 所以我们暂时使用 CPU 进行训练.** 1. 运行 `xcode-select --install` 安装 Xcode command-line tools. -2. 运行以下的命令来安装本项目: +2. 运行以下的命令来安装本项目: ```bash conda create -n GPTSoVits python=3.9 @@ -117,31 +118,51 @@ pip install -r extra-req.txt --no-deps pip install -r requirements.txt ``` -### 在 Docker 中使用 +### 运行 GPT-SoVITS(使用 Docker) -#### docker-compose.yaml 设置 +#### Docker 镜像选择 -0. image 的标签: 由于代码库更新很快, 镜像的打包和测试又很慢, 所以请自行在 [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)(旧版本) 查看当前打包好的最新的镜像并根据自己的情况选用, 或者在本地根据您自己的需求通过 Dockerfile 进行构建. -1. 环境变量: +由于代码库更新频繁,而 Docker 镜像的发布周期相对较慢,请注意: -- is_half: 半精度/双精度控制.在进行 "SSL extracting" 步骤时如果无法正确生成 4-cnhubert/5-wav32k 目录下的内容时, 一般都是它引起的, 可以根据实际情况来调整为 True 或者 False. +- 前往 [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) 查看最新可用的镜像标签(tags)。 +- 根据你的运行环境选择合适的镜像标签。 +- 可选:为了获得最新的更改,你可以使用提供的 Dockerfile 在本地构建镜像。 -2. Volume 设置, 容器内的应用根目录设置为 /workspace. 默认的 docker-compose.yaml 中列出了一些实际的例子, 便于上传/下载内容. -3. shm_size: Windows 下的 Docker Desktop 默认可用内存过小, 会导致运行异常, 根据自己情况酌情设置. -4. deploy 小节下的 gpu 相关内容, 请根据您的系统和实际情况酌情设置. +#### 环境变量 -#### 通过 docker compose 运行 +- `is_half`:控制是否启用半精度(fp16)。如果你的 GPU 支持,设置为 `true` 可以减少显存占用。 -``` -docker compose -f "docker-compose.yaml" up -d +#### 共享内存配置 + +在 Windows(Docker Desktop)中,默认共享内存大小较小,可能导致运行异常。请在 Docker Compose 文件中根据系统内存情况,增大 `shm_size`(例如设置为 `16g`)。 + +#### 选择服务 + +`docker-compose.yaml` 文件定义了两个主要服务类型: + +- `GPT-SoVITS-CU124` 与 `GPT-SoVITS-CU128`:完整版,包含所有功能。 +- `GPT-SoVITS-CU124-Lite` 与 `GPT-SoVITS-CU128-Lite`:轻量版,依赖更少,功能略有删减。 + +如需使用 Docker Compose 运行指定服务,请执行: + +```bash +docker compose run --service-ports ``` -#### 通过 docker 命令运行 +#### 本地构建 Docker 镜像 -同上, 根据您自己的实际情况修改对应的参数, 然后运行如下命令: +如果你希望自行构建镜像,请使用以下命令: +```bash +bash docker_build.sh --cuda <12.4|12.8> [--lite] ``` -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 + +#### 访问运行中的容器(Bash Shell) + +当容器在后台运行时,你可以通过以下命令进入容器: + +```bash +docker exec -it bash ``` ## 预训练模型 @@ -166,13 +187,13 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker ## 数据集格式 -文本到语音 (TTS) 注释 .list 文件格式: +文本到语音 (TTS) 注释 .list 文件格式: ``` vocal_path|speaker_name|language|text ``` -语言字典: +语言字典: - 'zh': 中文 - 'ja': 日语 @@ -180,7 +201,7 @@ vocal_path|speaker_name|language|text - 'ko': 韩语 - 'yue': 粤语 -示例: +示例: ``` D:\GPT-SoVITS\xxx/xxx.wav|xxx|zh|我爱玩原神. @@ -213,12 +234,12 @@ python webui.py v1 #### 现已支持自动填充路径 - 1. 填入训练音频路径 - 2. 切割音频 - 3. 进行降噪(可选) - 4. 进行ASR - 5. 校对标注 - 6. 前往下一个窗口,点击训练 +1. 填入训练音频路径 +2. 切割音频 +3. 进行降噪(可选) +4. 进行 ASR +5. 校对标注 +6. 前往下一个窗口,点击训练 ### 打开推理 WebUI @@ -286,7 +307,7 @@ python webui.py ## 待办事项清单 -- [x] **高优先级: ** +- [x] **高优先级:** - [x] 日语和英语的本地化. - [x] 用户指南. @@ -304,11 +325,11 @@ python webui.py - [x] 更好的 sovits 基础模型 (增强的音频质量). - [ ] 模型混合. -## (附加) 命令行运行方式 +## (附加) 命令行运行方式 使用命令行打开 UVR5 的 WebUI -``` +```bash python tools/uvr5/webui.py "" ``` @@ -319,7 +340,7 @@ python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level -- 这是使用命令行完成数据集的音频切分的方式 -``` +```bash python audio_slicer.py \ --input_path "" \ --output_root "" \ @@ -331,15 +352,15 @@ python audio_slicer.py \ 这是使用命令行完成数据集 ASR 处理的方式 (仅限中文) -``` +```bash python tools/asr/funasr_asr.py -i -o ``` 通过 Faster_Whisper 进行 ASR 处理 (除中文之外的 ASR 标记) - (没有进度条, GPU 性能可能会导致时间延迟) +(没有进度条, GPU 性能可能会导致时间延迟) -``` +```bash python ./tools/asr/fasterwhisper_asr.py -i -o -l -p ``` @@ -347,7 +368,7 @@ python ./tools/asr/fasterwhisper_asr.py -i -o -l -p ## 致谢 -特别感谢以下项目和贡献者: +特别感谢以下项目和贡献者: ### 理论研究 diff --git a/docs/ja/README.md b/docs/ja/README.md index 145de219..f7908722 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -40,14 +40,15 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350- ### テスト済みの環境 -| 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 | +| 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 | +| Python 3.9 | PyTorch 2.8.0dev | CUDA12.8 (for sm120) | ### Windows @@ -109,31 +110,51 @@ pip install -r extra-req.txt --no-deps pip install -r requirementx.txt ``` -### Docker の使用 +### GPT-SoVITS の実行(Docker 使用) -#### docker-compose.yaml の設定 +#### Docker イメージの選択 -0. イメージのタグについて: コードベースの更新が速い割に、イメージのパッケージングとテストが遅いため、[Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)(古いバージョン) で現在パッケージされている最新のイメージをご覧になり、ご自身の状況に応じて選択するか、またはご自身のニーズに応じて Dockerfile を使用してローカルでビルドしてください. -1. 環境変数: +コードベースの更新が頻繁である一方、Docker イメージのリリースは比較的遅いため、以下を確認してください: - - `is_half`: 半精度/倍精度の制御."SSL 抽出"ステップ中に`4-cnhubert/5-wav32k`ディレクトリ内の内容が正しく生成されない場合、通常これが原因です.実際の状況に応じて True または False に調整してください. +- [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) で最新のイメージタグを確認してください。 +- 環境に合った適切なイメージタグを選択してください。 +- オプション:最新の変更を反映させるため、提供されている Dockerfile を使ってローカルでイメージをビルドすることも可能です。 -2. ボリューム設定: コンテナ内のアプリケーションのルートディレクトリは`/workspace`に設定されます.デフォルトの`docker-compose.yaml`には、アップロード/ダウンロードの内容の実例がいくつか記載されています. -3. `shm_size`: Windows の Docker Desktop のデフォルトの利用可能メモリは小さすぎるため、うまく動作しない可能性があります.状況に応じて適宜設定してください. -4. `deploy`セクションの GPU に関連する内容は、システムと実際の状況に応じて慎重に設定してください. +#### 環境変数 -#### docker compose で実行する +- `is_half`:半精度(fp16)を使用するかどうかを制御します。GPU が対応している場合、`true` に設定することでメモリ使用量を削減できます。 -```markdown -docker compose -f "docker-compose.yaml" up -d +#### 共有メモリの設定 + +Windows(Docker Desktop)では、デフォルトの共有メモリサイズが小さいため、予期しない動作が発生する可能性があります。Docker Compose ファイル内の `shm_size` を(例:`16g`)に増やすことをおすすめします。 + +#### サービスの選択 + +`docker-compose.yaml` ファイルには次の 2 種類のサービスが定義されています: + +- `GPT-SoVITS-CU124` および `GPT-SoVITS-CU128`:すべての機能を含むフルバージョン +- `GPT-SoVITS-CU124-Lite` および `GPT-SoVITS-CU128-Lite`:依存関係を削減した軽量バージョン + +特定のサービスを Docker Compose で実行するには、以下のコマンドを使用します: + +```bash +docker compose run --service-ports ``` -#### docker コマンドで実行する +#### Docker イメージのローカルビルド -上記と同様に、実際の状況に基づいて対応するパラメータを変更し、次のコマンドを実行します: +自分でイメージをビルドするには、以下のコマンドを使ってください: -```markdown -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 +```bash +bash docker_build.sh --cuda <12.4|12.8> [--lite] +``` + +#### 実行中のコンテナへアクセス(Bash Shell) + +コンテナがバックグラウンドで実行されている場合、以下のコマンドでシェルにアクセスできます: + +```bash +docker exec -it bash ``` ## 事前訓練済みモデル @@ -201,12 +222,12 @@ python webui.py v1 <言語(オプション)> #### パス自動補完のサポート - 1. 音声パスを入力する - 2. 音声を小さなチャンクに分割する - 3. ノイズ除去 (オプション) - 4. ASR - 5. ASR転写を校正する - 6. 次のタブに移動し、モデルを微調整する +1. 音声パスを入力する +2. 音声を小さなチャンクに分割する +3. ノイズ除去 (オプション) +4. ASR +5. ASR 転写を校正する +6. 次のタブに移動し、モデルを微調整する ### 推論 WebUI を開く @@ -296,7 +317,7 @@ v2 環境から v3 を使用する方法: コマンド ラインを使用して UVR5 の WebUI を開きます -``` +```bash python tools/uvr5/webui.py "" ``` @@ -307,7 +328,7 @@ python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level -- コマンド ラインを使用してデータセットのオーディオ セグメンテーションを行う方法は次のとおりです. -``` +```bash python audio_slicer.py \ --input_path "" \ --output_root "" \ @@ -319,7 +340,7 @@ python audio_slicer.py \ コマンドラインを使用してデータセット ASR 処理を行う方法です (中国語のみ) -``` +```bash python tools/asr/funasr_asr.py -i -o ``` @@ -327,7 +348,7 @@ ASR 処理は Faster_Whisper を通じて実行されます(中国語を除く A (進行状況バーは表示されません.GPU のパフォーマンスにより時間遅延が発生する可能性があります) -``` +```bash python ./tools/asr/fasterwhisper_asr.py -i -o -l -p ``` @@ -335,7 +356,7 @@ python ./tools/asr/fasterwhisper_asr.py -i -o -l -p ## クレジット -特に以下のプロジェクトと貢献者に感謝します: +特に以下のプロジェクトと貢献者に感謝します: ### 理論研究 diff --git a/docs/ko/README.md b/docs/ko/README.md index e9fee8fc..11c00a3c 100644 --- a/docs/ko/README.md +++ b/docs/ko/README.md @@ -40,14 +40,15 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350- ### 테스트 통과 환경 -| 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 | +| 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.8.0dev | CUDA12.8 (for sm120) | +| 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 @@ -111,34 +112,51 @@ pip install -r extra-req.txt --no-deps pip install -r requirements.txt ``` -### Docker에서 사용 +### GPT-SoVITS 실행하기 (Docker 사용) -#### docker-compose.yaml 설정 +#### Docker 이미지 선택 -0. 이미지 태그: 코드 저장소가 빠르게 업데이트되고 패키지가 느리게 빌드되고 테스트되므로, 현재 빌드된 최신 도커 이미지를 [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)(오래된 버전) 에서 확인하고 필요에 따라 Dockerfile을 사용하여 로컬에서 빌드할 수 있습니다. +코드베이스가 빠르게 업데이트되는 반면 Docker 이미지 릴리스 주기는 느리기 때문에 다음을 참고하세요: -1. 환경 변수: +- [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits)에서 최신 이미지 태그를 확인하세요. +- 환경에 맞는 적절한 이미지 태그를 선택하세요. +- 선택 사항: 최신 변경사항을 반영하려면 제공된 Dockerfile을 사용하여 로컬에서 직접 이미지를 빌드할 수 있습니다. -- is_half: 반정밀/배정밀 제어. "SSL 추출" 단계에서 4-cnhubert/5-wav32k 디렉토리의 내용을 올바르게 생성할 수 없는 경우, 일반적으로 이것 때문입니다. 실제 상황에 따라 True 또는 False로 조정할 수 있습니다. +#### 환경 변수 -2. 볼륨 설정, 컨테이너 내의 애플리케이션 루트 디렉토리를 /workspace로 설정합니다. 기본 docker-compose.yaml에는 실제 예제가 나열되어 있으므로 업로드/다운로드를 쉽게 할 수 있습니다. +- `is_half`: 반정밀도(fp16) 사용 여부를 제어합니다. GPU가 지원하는 경우 `true`로 설정하면 메모리 사용량을 줄일 수 있습니다. -3. shm_size: Windows의 Docker Desktop의 기본 사용 가능한 메모리가 너무 작아 오류가 발생할 수 있으므로 실제 상황에 따라 조정합니다. +#### 공유 메모리 설정 -4. deploy 섹션의 gpu 관련 내용은 시스템 및 실제 상황에 따라 조정합니다. +Windows(Docker Desktop)에서는 기본 공유 메모리 크기가 작아 예기치 않은 동작이 발생할 수 있습니다. 시스템 메모리 상황에 따라 Docker Compose 파일에서 `shm_size`를 (예: `16g`)로 증가시키는 것이 좋습니다. -#### docker compose로 실행 +#### 서비스 선택 -``` -docker compose -f "docker-compose.yaml" up -d +`docker-compose.yaml` 파일에는 두 가지 서비스 유형이 정의되어 있습니다: + +- `GPT-SoVITS-CU124` 및 `GPT-SoVITS-CU128`: 전체 기능을 포함한 풀 버전 +- `GPT-SoVITS-CU124-Lite` 및 `GPT-SoVITS-CU128-Lite`: 의존성이 줄어든 경량 버전 + +특정 서비스를 Docker Compose로 실행하려면 다음 명령을 사용하세요: + +```bash +docker compose run --service-ports ``` -#### docker 명령으로 실행 +#### Docker 이미지 직접 빌드하기 -위와 동일하게 실제 상황에 맞게 매개변수를 수정한 다음 다음 명령을 실행합니다: +직접 이미지를 빌드하려면 다음 명령어를 사용하세요: +```bash +bash docker_build.sh --cuda <12.4|12.8> [--lite] ``` -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 + +#### 실행 중인 컨테이너 접속하기 (Bash Shell) + +컨테이너가 백그라운드에서 실행 중일 때 다음 명령어로 셸에 접속할 수 있습니다: + +```bash +docker exec -it bash ``` ## 사전 학습된 모델 @@ -206,12 +224,12 @@ python webui.py v1 <언어(옵션)> #### 경로 자동 채우기가 지원됩니다 - 1. 오디오 경로를 입력하십시오. - 2. 오디오를 작은 청크로 분할하십시오. - 3. 노이즈 제거(옵션) - 4. ASR 수행 - 5. ASR 전사를 교정하십시오. - 6. 다음 탭으로 이동하여 모델을 미세 조정하십시오. +1. 오디오 경로를 입력하십시오. +2. 오디오를 작은 청크로 분할하십시오. +3. 노이즈 제거(옵션) +4. ASR 수행 +5. ASR 전사를 교정하십시오. +6. 다음 탭으로 이동하여 모델을 미세 조정하십시오. ### 추론 WebUI 열기 @@ -302,7 +320,7 @@ v2 환경에서 v3 사용하기: 명령줄을 사용하여 UVR5용 WebUI 열기 -``` +```bash python tools/uvr5/webui.py "" ``` @@ -313,7 +331,7 @@ python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level -- 명령줄을 사용하여 데이터세트의 오디오 분할을 수행하는 방법은 다음과 같습니다. -``` +```bash python audio_slicer.py \ --input_path "" \ --output_root "" \ @@ -325,7 +343,7 @@ python audio_slicer.py \ 명령줄을 사용하여 데이터 세트 ASR 처리를 수행하는 방법입니다(중국어만 해당). -``` +```bash python tools/asr/funasr_asr.py -i -o ``` @@ -333,7 +351,7 @@ ASR 처리는 Faster_Whisper(중국어를 제외한 ASR 마킹)를 통해 수행 (진행률 표시줄 없음, GPU 성능으로 인해 시간 지연이 발생할 수 있음) -``` +```bash python ./tools/asr/fasterwhisper_asr.py -i -o -l -p ``` diff --git a/docs/tr/README.md b/docs/tr/README.md index d59f66ba..3d5a9dbe 100644 --- a/docs/tr/README.md +++ b/docs/tr/README.md @@ -42,14 +42,15 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350- ### Test Edilmiş Ortamlar -| 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 | +| 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.8.0dev | CUDA12.8 (for sm120) | +| 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 @@ -111,29 +112,51 @@ pip install -r extra-req.txt --no-deps pip install -r requirements.txt ``` -### Docker Kullanarak +### GPT-SoVITS Çalıştırma (Docker Kullanarak) -#### docker-compose.yaml yapılandırması +#### Docker İmajı Seçimi -0. Görüntü etiketleri hakkında: Kod tabanındaki hızlı güncellemeler ve görüntüleri paketleme ve test etme işleminin yavaş olması nedeniyle, lütfen şu anda paketlenmiş en son görüntüleri kontrol etmek için [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)(eski sürüm) adresini kontrol edin ve durumunuza göre seçim yapın veya alternatif olarak, kendi ihtiyaçlarınıza göre bir Dockerfile kullanarak yerel olarak oluşturun. -1. Ortam Değişkenleri: - - is_half: Yarım hassasiyet/çift hassasiyeti kontrol eder. Bu genellikle "SSL çıkarma" adımı sırasında 4-cnhubert/5-wav32k dizinleri altındaki içeriğin doğru şekilde oluşturulmamasının nedenidir. Gerçek durumunuza göre True veya False olarak ayarlayın. -2. Birim Yapılandırması, Kapsayıcı içindeki uygulamanın kök dizini /workspace olarak ayarlanmıştır. Varsayılan docker-compose.yaml, içerik yükleme/indirme için bazı pratik örnekler listeler. -3. shm_size: Windows üzerinde Docker Desktop için varsayılan kullanılabilir bellek çok küçüktür, bu da anormal işlemlere neden olabilir. Kendi durumunuza göre ayarlayın. -4. Dağıtım bölümü altında, GPU ile ilgili ayarlar sisteminize ve gerçek koşullara göre dikkatlice ayarlanmalıdır. +Kod tabanı hızla geliştiği halde Docker imajları daha yavaş yayınlandığı için lütfen şu adımları izleyin: -#### docker compose ile çalıştırma +- En güncel kullanılabilir imaj etiketlerini görmek için [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) adresini kontrol edin. +- Ortamınıza uygun bir imaj etiketi seçin. +- Opsiyonel: En güncel değişiklikleri almak için, sağlanan Dockerfile ile yerel olarak imajı kendiniz oluşturabilirsiniz. -``` -docker compose -f "docker-compose.yaml" up -d +#### Ortam Değişkenleri + +- `is_half`: Yarı hassasiyet (fp16) kullanımını kontrol eder. GPU’nuz destekliyorsa, belleği azaltmak için `true` olarak ayarlayın. + +#### Paylaşılan Bellek Yapılandırması + +Windows (Docker Desktop) ortamında, varsayılan paylaşılan bellek boyutu düşüktür ve bu beklenmedik hatalara neden olabilir. Sistem belleğinize göre Docker Compose dosyasındaki `shm_size` değerini (örneğin `16g`) artırmanız önerilir. + +#### Servis Seçimi + +`docker-compose.yaml` dosyasında iki tür servis tanımlanmıştır: + +- `GPT-SoVITS-CU124` ve `GPT-SoVITS-CU128`: Tüm özellikleri içeren tam sürüm. +- `GPT-SoVITS-CU124-Lite` ve `GPT-SoVITS-CU128-Lite`: Daha az bağımlılığa ve sınırlı işlevselliğe sahip hafif sürüm. + +Belirli bir servisi Docker Compose ile çalıştırmak için şu komutu kullanın: + +```bash +docker compose run --service-ports ``` -#### docker komutu ile çalıştırma +#### Docker İmajını Yerel Olarak Oluşturma -Yukarıdaki gibi, ilgili parametreleri gerçek durumunuza göre değiştirin, ardından aşağıdaki komutu çalıştırın: +Docker imajını kendiniz oluşturmak isterseniz şu komutu kullanın: +```bash +bash docker_build.sh --cuda <12.4|12.8> [--lite] ``` -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 + +#### Çalışan Konteynere Erişim (Bash Shell) + +Konteyner arka planda çalışırken, aşağıdaki komutla içine girebilirsiniz: + +```bash +docker exec -it bash ``` ## Önceden Eğitilmiş Modeller @@ -203,12 +226,12 @@ veya WebUI'de manuel olarak sürüm değiştirin. #### Yol Otomatik Doldurma artık destekleniyor - 1. Ses yolunu doldurun - 2. Sesi küçük parçalara ayırın - 3. Gürültü azaltma (isteğe bağlı) - 4. ASR - 5. ASR transkripsiyonlarını düzeltin - 6. Bir sonraki sekmeye geçin ve modeli ince ayar yapın +1. Ses yolunu doldurun +2. Sesi küçük parçalara ayırın +3. Gürültü azaltma (isteğe bağlı) +4. ASR +5. ASR transkripsiyonlarını düzeltin +6. Bir sonraki sekmeye geçin ve modeli ince ayar yapın ### Çıkarım WebUI'sini Açın @@ -298,7 +321,7 @@ V1 ortamından V2'yi kullanmak için: UVR5 için Web Arayüzünü açmak için komut satırını kullanın -``` +```bash python tools/uvr5/webui.py "" ``` @@ -309,7 +332,7 @@ python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level -- Veri setinin ses segmentasyonu komut satırı kullanılarak bu şekilde yapılır -``` +```bash python audio_slicer.py \ --input_path "" \ --output_root "" \ @@ -321,7 +344,7 @@ python audio_slicer.py \ Veri seti ASR işleme komut satırı kullanılarak bu şekilde yapılır (Yalnızca Çince) -``` +```bash python tools/asr/funasr_asr.py -i -o <çıktı> ``` @@ -329,7 +352,7 @@ ASR işleme Faster_Whisper aracılığıyla gerçekleştirilir (Çince dışınd (İlerleme çubukları yok, GPU performansı zaman gecikmelerine neden olabilir) -``` +```bash python ./tools/asr/fasterwhisper_asr.py -i -o <çıktı> -l ```