juliandreykorn commited on
Commit
578fa37
1 Parent(s): 849450f

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .env +8 -0
  2. .gitattributes +2 -0
  3. .gitignore +32 -0
  4. Dockerfile +47 -0
  5. Ilaria-RVC-Assistant.bat +30 -0
  6. Ilaria-RVC-Launcher.bat +7 -0
  7. LICENSE.md +32 -0
  8. README.md +107 -8
  9. Retrieval_based_Voice_Conversion_WebUI.ipynb +403 -0
  10. Retrieval_based_Voice_Conversion_WebUI_v2.ipynb +422 -0
  11. Tensorboard.bat +55 -0
  12. configs/config.json +1 -0
  13. configs/config.py +259 -0
  14. configs/v1/32k.json +46 -0
  15. configs/v1/40k.json +46 -0
  16. configs/v1/48k.json +46 -0
  17. configs/v2/32k.json +46 -0
  18. configs/v2/48k.json +46 -0
  19. configs/v2/OV2-32k.json +46 -0
  20. configs/v2/OV2-40k.json +46 -0
  21. configs/v2/Snowie-40k.json +46 -0
  22. configs/v2/Snowie-48k.json +46 -0
  23. configs/v2/SnowieV3.1-32k.json +46 -0
  24. configs/v2/SnowieV3.1-40k.json +46 -0
  25. configs/v2/SnowieV3.1-48k.json +46 -0
  26. configs/v2/SnowieV3.1-RinE3-40K.json +46 -0
  27. docker-compose.yml +20 -0
  28. docs/cn/Changelog_CN.md +109 -0
  29. docs/cn/faq.md +108 -0
  30. docs/en/Changelog_EN.md +105 -0
  31. docs/en/README.en.md +194 -0
  32. docs/en/faiss_tips_en.md +102 -0
  33. docs/en/faq_en.md +119 -0
  34. docs/en/training_tips_en.md +65 -0
  35. docs/fr/Changelog_FR.md +102 -0
  36. docs/fr/README.fr.md +146 -0
  37. docs/fr/faiss_tips_fr.md +105 -0
  38. docs/fr/faq_fr.md +169 -0
  39. docs/fr/training_tips_fr.md +65 -0
  40. docs/ilariarvcmainline.png +3 -0
  41. docs/jp/README.ja.md +109 -0
  42. docs/jp/faiss_tips_ja.md +101 -0
  43. docs/jp/training_tips_ja.md +64 -0
  44. docs/kr/Changelog_KO.md +106 -0
  45. docs/kr/README.ko.han.md +105 -0
  46. docs/kr/README.ko.md +117 -0
  47. docs/kr/faiss_tips_ko.md +132 -0
  48. docs/kr/training_tips_ko.md +53 -0
  49. docs/tr/Changelog_TR.md +97 -0
  50. docs/tr/README.tr.md +154 -0
.env ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ OPENBLAS_NUM_THREADS = 1
2
+ no_proxy = localhost, 127.0.0.1, ::1
3
+
4
+ # You can change the location of the model, etc. by changing here
5
+ weight_root = models/pth
6
+ weight_uvr5_root = assets/uvr5_weights
7
+ index_root = models/index
8
+ rmvpe_root = assets/rmvpe
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ docs/ilariarvcmainline.png filter=lfs diff=lfs merge=lfs -text
37
+ ilariarvcmainline.png filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .DS_Store
2
+ __pycache__
3
+ /TEMP
4
+ *.pyd
5
+ .venv
6
+ /opt
7
+ tools/aria2c/
8
+ tools/flag.txt
9
+
10
+ # Imported from huggingface.co/lj1995/VoiceConversionWebUI
11
+ #/pretrained
12
+ #/pretrained_v2
13
+ #/uvr5_weights
14
+ #hubert_base.pt
15
+ #rmvpe.onnx
16
+ #rmvpe.pt
17
+
18
+ # Generated by RVC
19
+ #/logs
20
+ #/weights
21
+
22
+ # To set a Python version for the project
23
+ .tool-versions
24
+
25
+ # Additional
26
+ #*.pth
27
+ *.log
28
+ /assets
29
+ /.idea
30
+ /TEMP
31
+ #/configs/v1
32
+ #/configs/v2
Dockerfile ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ FROM nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04
4
+
5
+ EXPOSE 7865
6
+
7
+ WORKDIR /app
8
+
9
+ COPY . .
10
+
11
+ # Install dependenceis to add PPAs
12
+ RUN apt-get update && \
13
+ apt-get install -y -qq ffmpeg aria2 && apt clean && \
14
+ apt-get install -y software-properties-common && \
15
+ apt-get clean && \
16
+ rm -rf /var/lib/apt/lists/*
17
+
18
+ # Add the deadsnakes PPA to get Python 3.9
19
+ RUN add-apt-repository ppa:deadsnakes/ppa
20
+
21
+ # Install Python 3.9 and pip
22
+ RUN apt-get update && \
23
+ apt-get install -y build-essential python-dev python3-dev python3.9-distutils python3.9-dev python3.9 curl && \
24
+ apt-get clean && \
25
+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
26
+ curl https://bootstrap.pypa.io/get-pip.py | python3.9
27
+
28
+ # Set Python 3.9 as the default
29
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
30
+
31
+ RUN python3 -m pip install --no-cache-dir -r requirements.txt
32
+
33
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d assets/pretrained_v2/ -o D40k.pth
34
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G40k.pth -d assets/pretrained_v2/ -o G40k.pth
35
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D40k.pth -d assets/pretrained_v2/ -o f0D40k.pth
36
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G40k.pth -d assets/pretrained_v2/ -o f0G40k.pth
37
+
38
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2-人声vocals+非人声instrumentals.pth -d assets/uvr5_weights/ -o HP2-人声vocals+非人声instrumentals.pth
39
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d assets/uvr5_weights/ -o HP5-主旋律人声vocals+其他instrumentals.pth
40
+
41
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d assets/hubert -o hubert_base.pt
42
+
43
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt -d assets/rmvpe -o rmvpe.pt
44
+
45
+ VOLUME [ "/app/weights", "/app/opt" ]
46
+
47
+ CMD ["python3", "infer-web.py"]
Ilaria-RVC-Assistant.bat ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ :menu
3
+ cls
4
+ echo Welcome to Ilaria RVC Mainline Assistant!
5
+ echo How can i help you today?
6
+ echo.
7
+ echo Please select an option:
8
+ echo 1. Run the update
9
+ echo 2. Download additional pretrain
10
+ echo 3. Exit
11
+ echo.
12
+ set /p userinp= "Enter your choice (1, 2 or 3): "
13
+ if /i "%userinp%" equ "1" (
14
+ echo You have selected to run the update.
15
+ python update.py
16
+ pause
17
+ goto menu
18
+ ) else if /i "%userinp%" equ "2" (
19
+ echo You have selected to download the additional pretrain.
20
+ python download_pretrain.py
21
+ pause
22
+ goto menu
23
+ ) else if /i "%userinp%" equ "3" (
24
+ echo Exiting the program.
25
+ exit
26
+ ) else (
27
+ echo Invalid choice. Please enter either 1, 2 or 3.
28
+ pause
29
+ goto menu
30
+ )
Ilaria-RVC-Launcher.bat ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ echo Ensuring audio-separator is installed before startup. Ignore the following notices.
3
+ runtime\python.exe -m pip install --quiet audio-separator
4
+ runtime\python.exe -m pip install --quiet audio-separator[gpu]
5
+ echo Ilaria RVC Starting...
6
+
7
+ start /B runtime\python.exe infer-web.py --pycmd runtime\python.exe --port 7897
LICENSE.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ilaria's Non-Commercial Use License (INCU)
2
+
3
+ ## 1. Definitions
4
+
5
+ - "Software" refers to the content present within this repository including code, graphics, sounds, images, text, and other files.
6
+ - "You" refers to the individual or entity that wishes to use the Software.
7
+ - "Ilaria" refers to the original creator of the Software.
8
+ - "Fork" refers to the action of creating a personal copy of another user's repository.
9
+
10
+ ## 2. Grant of Rights
11
+
12
+ Subject to the terms of this license, Ilaria hereby grants You a worldwide, royalty-free, non-exclusive, perpetual license to use the Software for personal, non-commercial purposes. This includes the rights to use, copy, modify, merge, publish, and distribute the Software for non-commercial purposes.
13
+
14
+ ## 3. Redistribution
15
+
16
+ You may not distribute or sell the Software, or any derivative works based on the Software, unless you have been specifically granted permission by Ilaria. Any permitted redistribution must also be under the terms of this license. Unauthorized distribution is strictly prohibited and will result in the termination of this license.
17
+
18
+ ## 4. Commercial Use
19
+
20
+ Commercial use of the Software is strictly prohibited without the express written consent of Ilaria. Small businesses may be granted permission to use the Software for profit, but large corporations must negotiate a commercial agreement with Ilaria. Unauthorized commercial use is strictly prohibited and will result in the termination of this license.
21
+
22
+ ## 5. Forking and Personal Use
23
+
24
+ You are free to fork and modify the Software for your own personal use. You may not distribute, publicly display, or create derivative works from your modifications unless granted permission by Ilaria. All modifications must also be under the terms of this license.
25
+
26
+ ## 6. Liability
27
+
28
+ Ilaria provides the Software "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall Ilaria be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software. You agree to use the Software at your own risk.
29
+
30
+ ## 7. Governing Law
31
+
32
+ This license is governed by the laws of the jurisdiction in which Ilaria resides. Any disputes related to this license will be resolved in the courts of that jurisdiction.
README.md CHANGED
@@ -1,12 +1,111 @@
1
  ---
2
- title: Ilaria Rvc Mainline
3
- emoji: 🐢
4
- colorFrom: yellow
5
- colorTo: red
6
  sdk: gradio
7
- sdk_version: 4.26.0
8
- app_file: app.py
9
- pinned: false
10
  ---
 
 
 
 
 
 
 
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: ilaria-rvc-mainline
3
+ app_file: infer-web.py
 
 
4
  sdk: gradio
5
+ sdk_version: 4.24.0
 
 
6
  ---
7
+ ![Ilaria AI Suite](./docs/ilariarvcmainline.png)
8
+ ***
9
+ [![Static Badge](https://img.shields.io/badge/GitHub-Source%20Code-s?logo=GitHub)]([https://github.com/TheStingerX/Ilaria-RVC](https://github.com/TheStingerX/Ilaria-RVC-Mainline)) [![Static Badge](https://img.shields.io/badge/AI%20Hub-Discord%20Server-s?logo=Discord&color=%09%237289da)](https://discord.gg/aihub) [![Static Badge](https://img.shields.io/badge/Ko--Fi-s?logo=Ko-Fi&label=Support%20me%20on&labelColor=434b57&color=FF5E5B)](https://ko-fi.com/ilariaowo)
10
+ ***
11
+ <p align="center">
12
+ <h1>Ilaria RVC Mainline 💖</h1>
13
+ </p>
14
 
15
+ 🎉 Welcome to Ilaria RVC Mainline! 🎉
16
+
17
+ This project leverages various libraries and modules to create a Graphical User Interface (GUI) for voice conversion.
18
+ Currently the fastest and easiest way to experience RVC!
19
+ It's primarily designed for local users. 🖥️
20
+
21
+ Ilaria RVC is part of the Ilaria AI Suite wich includes various easy and powerful tools. 💖
22
+
23
+ ## 📦 Installation 📦
24
+
25
+ Download and extract the zip you find in the latest release!🌟
26
+
27
+ To run it, use Ilaria-RVC-Launcher.bat
28
+
29
+ For updates or to download the additional pretrains, use the Ilaria-RVC-Assistant.bat 💖
30
+
31
+ ## 🖥️ Usage 🖥️
32
+
33
+ Once the project is completed and available for installation, detailed instructions on how to use the application will be provided here.
34
+ This will include steps to configure the application, start the application, and use the various features of the application. 🌐
35
+
36
+ ## 🌟 Features 🌟
37
+
38
+ Ilaria RVC offers a range of features, including:
39
+
40
+ - 🎙️ **Convert audio with a desired voice model**:
41
+ With Ilaria RVC, you can transform any audio using the voice model you prefer. It’s like having a personal voice-over artist at your fingertips.
42
+
43
+ - ⚡ **Fast Inference and Training**:
44
+ Thanks to code optimization and the use of advanced hardware, Ilaria RVC will be able to perform model inference and training in record time.
45
+ This will save you precious time and allow you to focus on what really matters.
46
+
47
+ - 💾 **Download a voice model directly from the interface**:
48
+ You can directly download models with the download without using any other interface, How convenient is that?
49
+
50
+ - 🔄 **Automatic Model Import**:
51
+ No more manual uploading of your models. With automatic import, Ilaria RVC will be able to detect and import your models as soon as they become available.
52
+
53
+ - 🚀 **Advanced and cutting-edge options for conversion**:
54
+ Ilaria RVC offers conversion options that are at the forefront of AI. You can tailor your experience to your specific needs.
55
+
56
+ - 🧠 **Custom Model Training**:
57
+ With Ilaria RVC, you can train your own custom voice models. This will give you even more control over the quality and characteristics of the generated voice.
58
+
59
+ - 🛠️ **Constantly updated by Ilaria and AI Hub engineers**:
60
+ Ilaria RVC is a product in constant evolution. Ilaria and the team of AI Hub engineers are constantly working to improve and update the system.
61
+
62
+ - 🗣️ **A choice of 3 different TTS models including Ilaria TTS**:
63
+ You’re spoilt for choice with Ilaria RVC. You can choose from three different voice synthesis models, including Ilaria TTS.
64
+
65
+ - ✔️ **Ease of use for inexperienced users**:
66
+ Don’t worry if you’re not a tech whiz. Ilaria RVC is designed to be easy to use for everyone, regardless of their level of experience.
67
+
68
+ ## 🙏 Credits 🙏
69
+
70
+ ### Developers
71
+
72
+ - **Ilaria**: Founder, Lead Developer
73
+ - **Yui**: Training feature
74
+ - **GDR-**: Inference feature
75
+ - **Poopmaster**: Model downloader, Model importer
76
+ - **kitlemonfoot**: Ilaria TTS implementation
77
+ - **eddycrack864**: UVR5 implementation
78
+ - **Mikus**: Ilaria Updater & Downloader
79
+ - **Diablo**: Pretrain Automation, UI features, Various fixes
80
+
81
+ ### Beta Tester
82
+
83
+ - **Charlotte**: Beta Tester, Advisor
84
+ - **mrm0dz**: Beta Tester, Advisor
85
+ - **RME**: Beta Tester
86
+ - **Delik**: Beta Tester
87
+ - **inductivegrub**: Beta Tester
88
+ - **l3af**: Beta Tester, Helper
89
+
90
+ ### Pretrains Makers
91
+
92
+ - **simplcup**: Ov2Super
93
+ - **mustar22**: RIN_E3 & Snowie
94
+
95
+ ### Other
96
+
97
+ - **RVC Project**: Original Developers
98
+ - **yumereborn**: Ilaria RVC image
99
+
100
+ ### **In loving memory of JLabDX** 🕊️
101
+
102
+ ## 🤝 Contributing 🤝
103
+
104
+ Interested in contributing to this project? Ilaria is always looking for collaborators.
105
+ Feel free to open a pull request on Github.
106
+
107
+ ## 📄 License 📄
108
+
109
+ This project is released under the `INCU` license.
110
+ For more details, please check the license file.
111
+ For further questions feel free to contact Ilaria.
Retrieval_based_Voice_Conversion_WebUI.ipynb ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "attachments": {},
5
+ "cell_type": "markdown",
6
+ "metadata": {},
7
+ "source": [
8
+ "# [Retrieval-based-Voice-Conversion-WebUI](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI) Training notebook"
9
+ ]
10
+ },
11
+ {
12
+ "attachments": {},
13
+ "cell_type": "markdown",
14
+ "metadata": {
15
+ "id": "ZFFCx5J80SGa"
16
+ },
17
+ "source": [
18
+ "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": null,
24
+ "metadata": {
25
+ "id": "GmFP6bN9dvOq"
26
+ },
27
+ "outputs": [],
28
+ "source": [
29
+ "# @title 查看显卡\n",
30
+ "!nvidia-smi"
31
+ ]
32
+ },
33
+ {
34
+ "cell_type": "code",
35
+ "execution_count": null,
36
+ "metadata": {
37
+ "id": "jwu07JgqoFON"
38
+ },
39
+ "outputs": [],
40
+ "source": [
41
+ "# @title 挂载谷歌云盘\n",
42
+ "\n",
43
+ "from google.colab import drive\n",
44
+ "\n",
45
+ "drive.mount(\"/content/drive\")"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "code",
50
+ "execution_count": null,
51
+ "metadata": {
52
+ "id": "wjddIFr1oS3W"
53
+ },
54
+ "outputs": [],
55
+ "source": [
56
+ "# @title 安装依赖\n",
57
+ "!apt-get -y install build-essential python3-dev ffmpeg\n",
58
+ "!pip3 install --upgrade setuptools wheel\n",
59
+ "!pip3 install --upgrade pip\n",
60
+ "!pip3 install faiss-cpu==1.7.2 fairseq gradio==3.14.0 ffmpeg ffmpeg-python praat-parselmouth pyworld numpy==1.23.5 numba==0.56.4 librosa==0.9.2"
61
+ ]
62
+ },
63
+ {
64
+ "cell_type": "code",
65
+ "execution_count": null,
66
+ "metadata": {
67
+ "id": "ge_97mfpgqTm"
68
+ },
69
+ "outputs": [],
70
+ "source": [
71
+ "# @title 克隆仓库\n",
72
+ "\n",
73
+ "!git clone --depth=1 -b stable https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI\n",
74
+ "%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
75
+ "!mkdir -p pretrained uvr5_weights"
76
+ ]
77
+ },
78
+ {
79
+ "cell_type": "code",
80
+ "execution_count": null,
81
+ "metadata": {
82
+ "id": "BLDEZADkvlw1"
83
+ },
84
+ "outputs": [],
85
+ "source": [
86
+ "# @title 更新仓库(一般无需执行)\n",
87
+ "!git pull"
88
+ ]
89
+ },
90
+ {
91
+ "cell_type": "code",
92
+ "execution_count": null,
93
+ "metadata": {
94
+ "id": "pqE0PrnuRqI2"
95
+ },
96
+ "outputs": [],
97
+ "source": [
98
+ "# @title 安装aria2\n",
99
+ "!apt -y install -qq aria2"
100
+ ]
101
+ },
102
+ {
103
+ "cell_type": "code",
104
+ "execution_count": null,
105
+ "metadata": {
106
+ "id": "UG3XpUwEomUz"
107
+ },
108
+ "outputs": [],
109
+ "source": [
110
+ "# @title 下载底模\n",
111
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D32k.pth\n",
112
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D40k.pth\n",
113
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D48k.pth\n",
114
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o G32k.pth\n",
115
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o G40k.pth\n",
116
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o G48k.pth\n",
117
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D32k.pth\n",
118
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D40k.pth\n",
119
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D48k.pth\n",
120
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G32k.pth\n",
121
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G40k.pth\n",
122
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G48k.pth"
123
+ ]
124
+ },
125
+ {
126
+ "cell_type": "code",
127
+ "execution_count": null,
128
+ "metadata": {
129
+ "id": "HugjmZqZRuiF"
130
+ },
131
+ "outputs": [],
132
+ "source": [
133
+ "# @title 下载人声分离模型\n",
134
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2-人声vocals+非人声instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP2-人声vocals+非人声instrumentals.pth\n",
135
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP5-主旋律人声vocals+其他instrumentals.pth"
136
+ ]
137
+ },
138
+ {
139
+ "cell_type": "code",
140
+ "execution_count": null,
141
+ "metadata": {
142
+ "id": "2RCaT9FTR0ej"
143
+ },
144
+ "outputs": [],
145
+ "source": [
146
+ "# @title 下载hubert_base\n",
147
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d /content/Retrieval-based-Voice-Conversion-WebUI -o hubert_base.pt"
148
+ ]
149
+ },
150
+ {
151
+ "cell_type": "code",
152
+ "execution_count": null,
153
+ "metadata": {},
154
+ "outputs": [],
155
+ "source": [
156
+ "# @title #下载rmvpe模型\n",
157
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt -d /content/Retrieval-based-Voice-Conversion-WebUI -o rmvpe.pt"
158
+ ]
159
+ },
160
+ {
161
+ "cell_type": "code",
162
+ "execution_count": null,
163
+ "metadata": {
164
+ "id": "Mwk7Q0Loqzjx"
165
+ },
166
+ "outputs": [],
167
+ "source": [
168
+ "# @title 从谷歌云盘加载打包好的数据集到/content/dataset\n",
169
+ "\n",
170
+ "# @markdown 数据集位置\n",
171
+ "DATASET = (\n",
172
+ " \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" # @param {type:\"string\"}\n",
173
+ ")\n",
174
+ "\n",
175
+ "!mkdir -p /content/dataset\n",
176
+ "!unzip -d /content/dataset -B {DATASET}"
177
+ ]
178
+ },
179
+ {
180
+ "cell_type": "code",
181
+ "execution_count": null,
182
+ "metadata": {
183
+ "id": "PDlFxWHWEynD"
184
+ },
185
+ "outputs": [],
186
+ "source": [
187
+ "# @title 重命名数据集中的重名文件\n",
188
+ "!ls -a /content/dataset/\n",
189
+ "!rename 's/(\\w+)\\.(\\w+)~(\\d*)/$1_$3.$2/' /content/dataset/*.*~*"
190
+ ]
191
+ },
192
+ {
193
+ "cell_type": "code",
194
+ "execution_count": null,
195
+ "metadata": {
196
+ "id": "7vh6vphDwO0b"
197
+ },
198
+ "outputs": [],
199
+ "source": [
200
+ "# @title 启动web\n",
201
+ "%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
202
+ "# %load_ext tensorboard\n",
203
+ "# %tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs\n",
204
+ "!python3 infer-web.py --colab --pycmd python3"
205
+ ]
206
+ },
207
+ {
208
+ "cell_type": "code",
209
+ "execution_count": null,
210
+ "metadata": {
211
+ "id": "FgJuNeAwx5Y_"
212
+ },
213
+ "outputs": [],
214
+ "source": [
215
+ "# @title 手动将训练后的模型文件备份到谷歌云盘\n",
216
+ "# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
217
+ "\n",
218
+ "# @markdown 模型名\n",
219
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
220
+ "# @markdown 模型epoch\n",
221
+ "MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
222
+ "\n",
223
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
224
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
225
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/added_*.index /content/drive/MyDrive/\n",
226
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/total_*.npy /content/drive/MyDrive/\n",
227
+ "\n",
228
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/weights/{MODELNAME}.pth /content/drive/MyDrive/{MODELNAME}{MODELEPOCH}.pth"
229
+ ]
230
+ },
231
+ {
232
+ "cell_type": "code",
233
+ "execution_count": null,
234
+ "metadata": {
235
+ "id": "OVQoLQJXS7WX"
236
+ },
237
+ "outputs": [],
238
+ "source": [
239
+ "# @title 从谷歌云盘恢复pth\n",
240
+ "# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
241
+ "\n",
242
+ "# @markdown 模型名\n",
243
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
244
+ "# @markdown 模型epoch\n",
245
+ "MODELEPOCH = 7500 # @param {type:\"integer\"}\n",
246
+ "\n",
247
+ "!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
248
+ "\n",
249
+ "!cp /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
250
+ "!cp /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
251
+ "!cp /content/drive/MyDrive/*.index /content/\n",
252
+ "!cp /content/drive/MyDrive/*.npy /content/\n",
253
+ "!cp /content/drive/MyDrive/{MODELNAME}{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/weights/{MODELNAME}.pth"
254
+ ]
255
+ },
256
+ {
257
+ "cell_type": "code",
258
+ "execution_count": null,
259
+ "metadata": {
260
+ "id": "ZKAyuKb9J6dz"
261
+ },
262
+ "outputs": [],
263
+ "source": [
264
+ "# @title 手动预处理(不推荐)\n",
265
+ "# @markdown 模型名\n",
266
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
267
+ "# @markdown 采样率\n",
268
+ "BITRATE = 48000 # @param {type:\"integer\"}\n",
269
+ "# @markdown 使用的进程数\n",
270
+ "THREADCOUNT = 8 # @param {type:\"integer\"}\n",
271
+ "\n",
272
+ "!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True"
273
+ ]
274
+ },
275
+ {
276
+ "cell_type": "code",
277
+ "execution_count": null,
278
+ "metadata": {
279
+ "id": "CrxJqzAUKmPJ"
280
+ },
281
+ "outputs": [],
282
+ "source": [
283
+ "# @title 手动提取特征(不推荐)\n",
284
+ "# @markdown 模型名\n",
285
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
286
+ "# @markdown 使用的进程数\n",
287
+ "THREADCOUNT = 8 # @param {type:\"integer\"}\n",
288
+ "# @markdown 音高提取算法\n",
289
+ "ALGO = \"harvest\" # @param {type:\"string\"}\n",
290
+ "\n",
291
+ "!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n",
292
+ "\n",
293
+ "!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}"
294
+ ]
295
+ },
296
+ {
297
+ "cell_type": "code",
298
+ "execution_count": null,
299
+ "metadata": {
300
+ "id": "IMLPLKOaKj58"
301
+ },
302
+ "outputs": [],
303
+ "source": [
304
+ "# @title 手动训练(不推荐)\n",
305
+ "# @markdown 模型名\n",
306
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
307
+ "# @markdown 使用的GPU\n",
308
+ "USEGPU = \"0\" # @param {type:\"string\"}\n",
309
+ "# @markdown 批大小\n",
310
+ "BATCHSIZE = 32 # @param {type:\"integer\"}\n",
311
+ "# @markdown 停止的epoch\n",
312
+ "MODELEPOCH = 3200 # @param {type:\"integer\"}\n",
313
+ "# @markdown 保存epoch间隔\n",
314
+ "EPOCHSAVE = 100 # @param {type:\"integer\"}\n",
315
+ "# @markdown 采样率\n",
316
+ "MODELSAMPLE = \"48k\" # @param {type:\"string\"}\n",
317
+ "# @markdown 是否缓存训练集\n",
318
+ "CACHEDATA = 1 # @param {type:\"integer\"}\n",
319
+ "# @markdown 是否仅保存最新的ckpt文件\n",
320
+ "ONLYLATEST = 0 # @param {type:\"integer\"}\n",
321
+ "\n",
322
+ "!python3 train_nsf_sim_cache_sid_load_pretrain.py -e lulu -sr {MODELSAMPLE} -f0 1 -bs {BATCHSIZE} -g {USEGPU} -te {MODELEPOCH} -se {EPOCHSAVE} -pg pretrained/f0G{MODELSAMPLE}.pth -pd pretrained/f0D{MODELSAMPLE}.pth -l {ONLYLATEST} -c {CACHEDATA}"
323
+ ]
324
+ },
325
+ {
326
+ "cell_type": "code",
327
+ "execution_count": null,
328
+ "metadata": {
329
+ "id": "haYA81hySuDl"
330
+ },
331
+ "outputs": [],
332
+ "source": [
333
+ "# @title 删除其它pth,只留选中的(慎点,仔细看代码)\n",
334
+ "# @markdown 模型名\n",
335
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
336
+ "# @markdown 选中模型epoch\n",
337
+ "MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
338
+ "\n",
339
+ "!echo \"备份选中的模型。。。\"\n",
340
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
341
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/{MODELNAME}_G_{MODELEPOCH}.pth\n",
342
+ "\n",
343
+ "!echo \"正在删除。。。\"\n",
344
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
345
+ "!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n",
346
+ "\n",
347
+ "!echo \"恢复选中的模型。。。\"\n",
348
+ "!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
349
+ "!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
350
+ "\n",
351
+ "!echo \"删除完成\"\n",
352
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}"
353
+ ]
354
+ },
355
+ {
356
+ "cell_type": "code",
357
+ "execution_count": null,
358
+ "metadata": {
359
+ "id": "QhSiPTVPoIRh"
360
+ },
361
+ "outputs": [],
362
+ "source": [
363
+ "# @title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n",
364
+ "# @markdown 模型名\n",
365
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
366
+ "# @markdown 选中模型epoch\n",
367
+ "MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
368
+ "\n",
369
+ "!echo \"备份选中的模型。。。\"\n",
370
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
371
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/{MODELNAME}_G_{MODELEPOCH}.pth\n",
372
+ "\n",
373
+ "!echo \"正��删除。。。\"\n",
374
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
375
+ "!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n",
376
+ "\n",
377
+ "!echo \"恢复选中的模型。。。\"\n",
378
+ "!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
379
+ "!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
380
+ "\n",
381
+ "!echo \"删除完成\"\n",
382
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}"
383
+ ]
384
+ }
385
+ ],
386
+ "metadata": {
387
+ "accelerator": "GPU",
388
+ "colab": {
389
+ "private_outputs": true,
390
+ "provenance": []
391
+ },
392
+ "gpuClass": "standard",
393
+ "kernelspec": {
394
+ "display_name": "Python 3",
395
+ "name": "python3"
396
+ },
397
+ "language_info": {
398
+ "name": "python"
399
+ }
400
+ },
401
+ "nbformat": 4,
402
+ "nbformat_minor": 0
403
+ }
Retrieval_based_Voice_Conversion_WebUI_v2.ipynb ADDED
@@ -0,0 +1,422 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "attachments": {},
5
+ "cell_type": "markdown",
6
+ "metadata": {},
7
+ "source": [
8
+ "# [Retrieval-based-Voice-Conversion-WebUI](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI) Training notebook"
9
+ ]
10
+ },
11
+ {
12
+ "attachments": {},
13
+ "cell_type": "markdown",
14
+ "metadata": {
15
+ "id": "ZFFCx5J80SGa"
16
+ },
17
+ "source": [
18
+ "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI_v2.ipynb)"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": null,
24
+ "metadata": {
25
+ "id": "GmFP6bN9dvOq"
26
+ },
27
+ "outputs": [],
28
+ "source": [
29
+ "# @title #查看显卡\n",
30
+ "!nvidia-smi"
31
+ ]
32
+ },
33
+ {
34
+ "cell_type": "code",
35
+ "execution_count": null,
36
+ "metadata": {
37
+ "id": "jwu07JgqoFON"
38
+ },
39
+ "outputs": [],
40
+ "source": [
41
+ "# @title 挂载谷歌云盘\n",
42
+ "\n",
43
+ "from google.colab import drive\n",
44
+ "\n",
45
+ "drive.mount(\"/content/drive\")"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "code",
50
+ "execution_count": null,
51
+ "metadata": {
52
+ "id": "wjddIFr1oS3W"
53
+ },
54
+ "outputs": [],
55
+ "source": [
56
+ "# @title #安装依赖\n",
57
+ "!apt-get -y install build-essential python3-dev ffmpeg\n",
58
+ "!pip3 install --upgrade setuptools wheel\n",
59
+ "!pip3 install --upgrade pip\n",
60
+ "!pip3 install faiss-cpu==1.7.2 fairseq gradio==3.14.0 ffmpeg ffmpeg-python praat-parselmouth pyworld numpy==1.23.5 numba==0.56.4 librosa==0.9.2"
61
+ ]
62
+ },
63
+ {
64
+ "cell_type": "code",
65
+ "execution_count": null,
66
+ "metadata": {
67
+ "id": "ge_97mfpgqTm"
68
+ },
69
+ "outputs": [],
70
+ "source": [
71
+ "# @title #克隆仓库\n",
72
+ "\n",
73
+ "!mkdir Retrieval-based-Voice-Conversion-WebUI\n",
74
+ "%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
75
+ "!git init\n",
76
+ "!git remote add origin https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git\n",
77
+ "!git fetch origin cfd984812804ddc9247d65b14c82cd32e56c1133 --depth=1\n",
78
+ "!git reset --hard FETCH_HEAD"
79
+ ]
80
+ },
81
+ {
82
+ "cell_type": "code",
83
+ "execution_count": null,
84
+ "metadata": {
85
+ "id": "BLDEZADkvlw1"
86
+ },
87
+ "outputs": [],
88
+ "source": [
89
+ "# @title #更新仓库(一般无需执行)\n",
90
+ "!git pull"
91
+ ]
92
+ },
93
+ {
94
+ "cell_type": "code",
95
+ "execution_count": null,
96
+ "metadata": {
97
+ "id": "pqE0PrnuRqI2"
98
+ },
99
+ "outputs": [],
100
+ "source": [
101
+ "# @title #安装aria2\n",
102
+ "!apt -y install -qq aria2"
103
+ ]
104
+ },
105
+ {
106
+ "cell_type": "code",
107
+ "execution_count": null,
108
+ "metadata": {
109
+ "id": "UG3XpUwEomUz"
110
+ },
111
+ "outputs": [],
112
+ "source": [
113
+ "# @title 下载底模\n",
114
+ "\n",
115
+ "# v1\n",
116
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D32k.pth\n",
117
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D40k.pth\n",
118
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D48k.pth\n",
119
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o G32k.pth\n",
120
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o G40k.pth\n",
121
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o G48k.pth\n",
122
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D32k.pth\n",
123
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D40k.pth\n",
124
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D48k.pth\n",
125
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G32k.pth\n",
126
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G40k.pth\n",
127
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G48k.pth\n",
128
+ "\n",
129
+ "# v2\n",
130
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D32k.pth\n",
131
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D40k.pth\n",
132
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D48k.pth\n",
133
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o G32k.pth\n",
134
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o G40k.pth\n",
135
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o G48k.pth\n",
136
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o f0D32k.pth\n",
137
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o f0D40k.pth\n",
138
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o f0D48k.pth\n",
139
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o f0G32k.pth\n",
140
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o f0G40k.pth\n",
141
+ "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o f0G48k.pth"
142
+ ]
143
+ },
144
+ {
145
+ "cell_type": "code",
146
+ "execution_count": null,
147
+ "metadata": {
148
+ "id": "HugjmZqZRuiF"
149
+ },
150
+ "outputs": [],
151
+ "source": [
152
+ "# @title #下载人声分离模型\n",
153
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2-人声vocals+非人声instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP2-人声vocals+非人声instrumentals.pth\n",
154
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP5-主旋律人声vocals+其他instrumentals.pth"
155
+ ]
156
+ },
157
+ {
158
+ "cell_type": "code",
159
+ "execution_count": null,
160
+ "metadata": {
161
+ "id": "2RCaT9FTR0ej"
162
+ },
163
+ "outputs": [],
164
+ "source": [
165
+ "# @title #下载hubert_base\n",
166
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d /content/Retrieval-based-Voice-Conversion-WebUI -o hubert_base.pt"
167
+ ]
168
+ },
169
+ {
170
+ "cell_type": "code",
171
+ "execution_count": null,
172
+ "metadata": {},
173
+ "outputs": [],
174
+ "source": [
175
+ "# @title #下载rmvpe模型\n",
176
+ "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt -d /content/Retrieval-based-Voice-Conversion-WebUI -o rmvpe.pt"
177
+ ]
178
+ },
179
+ {
180
+ "cell_type": "code",
181
+ "execution_count": null,
182
+ "metadata": {
183
+ "id": "Mwk7Q0Loqzjx"
184
+ },
185
+ "outputs": [],
186
+ "source": [
187
+ "# @title #从谷歌云盘加载打包好的数据集到/content/dataset\n",
188
+ "\n",
189
+ "# @markdown 数据集位置\n",
190
+ "DATASET = (\n",
191
+ " \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" # @param {type:\"string\"}\n",
192
+ ")\n",
193
+ "\n",
194
+ "!mkdir -p /content/dataset\n",
195
+ "!unzip -d /content/dataset -B {DATASET}"
196
+ ]
197
+ },
198
+ {
199
+ "cell_type": "code",
200
+ "execution_count": null,
201
+ "metadata": {
202
+ "id": "PDlFxWHWEynD"
203
+ },
204
+ "outputs": [],
205
+ "source": [
206
+ "# @title #重命名数据集中的重名文件\n",
207
+ "!ls -a /content/dataset/\n",
208
+ "!rename 's/(\\w+)\\.(\\w+)~(\\d*)/$1_$3.$2/' /content/dataset/*.*~*"
209
+ ]
210
+ },
211
+ {
212
+ "cell_type": "code",
213
+ "execution_count": null,
214
+ "metadata": {
215
+ "id": "7vh6vphDwO0b"
216
+ },
217
+ "outputs": [],
218
+ "source": [
219
+ "# @title #启动webui\n",
220
+ "%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
221
+ "# %load_ext tensorboard\n",
222
+ "# %tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs\n",
223
+ "!python3 infer-web.py --colab --pycmd python3"
224
+ ]
225
+ },
226
+ {
227
+ "cell_type": "code",
228
+ "execution_count": null,
229
+ "metadata": {
230
+ "id": "FgJuNeAwx5Y_"
231
+ },
232
+ "outputs": [],
233
+ "source": [
234
+ "# @title #手动将训练后的模型文件备份到谷歌云盘\n",
235
+ "# @markdown #需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
236
+ "\n",
237
+ "# @markdown #模型名\n",
238
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
239
+ "# @markdown #模型epoch\n",
240
+ "MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
241
+ "\n",
242
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
243
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
244
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/added_*.index /content/drive/MyDrive/\n",
245
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/total_*.npy /content/drive/MyDrive/\n",
246
+ "\n",
247
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/weights/{MODELNAME}.pth /content/drive/MyDrive/{MODELNAME}{MODELEPOCH}.pth"
248
+ ]
249
+ },
250
+ {
251
+ "cell_type": "code",
252
+ "execution_count": null,
253
+ "metadata": {
254
+ "id": "OVQoLQJXS7WX"
255
+ },
256
+ "outputs": [],
257
+ "source": [
258
+ "# @title 从谷歌云盘恢复pth\n",
259
+ "# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
260
+ "\n",
261
+ "# @markdown 模型名\n",
262
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
263
+ "# @markdown 模型epoch\n",
264
+ "MODELEPOCH = 7500 # @param {type:\"integer\"}\n",
265
+ "\n",
266
+ "!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
267
+ "\n",
268
+ "!cp /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
269
+ "!cp /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
270
+ "!cp /content/drive/MyDrive/*.index /content/\n",
271
+ "!cp /content/drive/MyDrive/*.npy /content/\n",
272
+ "!cp /content/drive/MyDrive/{MODELNAME}{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/weights/{MODELNAME}.pth"
273
+ ]
274
+ },
275
+ {
276
+ "cell_type": "code",
277
+ "execution_count": null,
278
+ "metadata": {
279
+ "id": "ZKAyuKb9J6dz"
280
+ },
281
+ "outputs": [],
282
+ "source": [
283
+ "# @title 手动预处理(不推荐)\n",
284
+ "# @markdown 模型名\n",
285
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
286
+ "# @markdown 采样率\n",
287
+ "BITRATE = 48000 # @param {type:\"integer\"}\n",
288
+ "# @markdown 使用的进程数\n",
289
+ "THREADCOUNT = 8 # @param {type:\"integer\"}\n",
290
+ "\n",
291
+ "!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True"
292
+ ]
293
+ },
294
+ {
295
+ "cell_type": "code",
296
+ "execution_count": null,
297
+ "metadata": {
298
+ "id": "CrxJqzAUKmPJ"
299
+ },
300
+ "outputs": [],
301
+ "source": [
302
+ "# @title 手动提取特征(不推荐)\n",
303
+ "# @markdown 模型名\n",
304
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
305
+ "# @markdown 使用的进程数\n",
306
+ "THREADCOUNT = 8 # @param {type:\"integer\"}\n",
307
+ "# @markdown 音高提取算法\n",
308
+ "ALGO = \"harvest\" # @param {type:\"string\"}\n",
309
+ "\n",
310
+ "!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n",
311
+ "\n",
312
+ "!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}"
313
+ ]
314
+ },
315
+ {
316
+ "cell_type": "code",
317
+ "execution_count": null,
318
+ "metadata": {
319
+ "id": "IMLPLKOaKj58"
320
+ },
321
+ "outputs": [],
322
+ "source": [
323
+ "# @title 手动训练(不推荐)\n",
324
+ "# @markdown 模型名\n",
325
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
326
+ "# @markdown 使用的GPU\n",
327
+ "USEGPU = \"0\" # @param {type:\"string\"}\n",
328
+ "# @markdown 批大小\n",
329
+ "BATCHSIZE = 32 # @param {type:\"integer\"}\n",
330
+ "# @markdown 停止的epoch\n",
331
+ "MODELEPOCH = 3200 # @param {type:\"integer\"}\n",
332
+ "# @markdown 保存epoch间隔\n",
333
+ "EPOCHSAVE = 100 # @param {type:\"integer\"}\n",
334
+ "# @markdown 采样率\n",
335
+ "MODELSAMPLE = \"48k\" # @param {type:\"string\"}\n",
336
+ "# @markdown 是否缓存训练集\n",
337
+ "CACHEDATA = 1 # @param {type:\"integer\"}\n",
338
+ "# @markdown 是否仅保存最新的ckpt文件\n",
339
+ "ONLYLATEST = 0 # @param {type:\"integer\"}\n",
340
+ "\n",
341
+ "!python3 train_nsf_sim_cache_sid_load_pretrain.py -e lulu -sr {MODELSAMPLE} -f0 1 -bs {BATCHSIZE} -g {USEGPU} -te {MODELEPOCH} -se {EPOCHSAVE} -pg pretrained/f0G{MODELSAMPLE}.pth -pd pretrained/f0D{MODELSAMPLE}.pth -l {ONLYLATEST} -c {CACHEDATA}"
342
+ ]
343
+ },
344
+ {
345
+ "cell_type": "code",
346
+ "execution_count": null,
347
+ "metadata": {
348
+ "id": "haYA81hySuDl"
349
+ },
350
+ "outputs": [],
351
+ "source": [
352
+ "# @title 删除其它pth,只留选中的(慎点,仔细看代码)\n",
353
+ "# @markdown 模型名\n",
354
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
355
+ "# @markdown 选中模型epoch\n",
356
+ "MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
357
+ "\n",
358
+ "!echo \"备份选中的模型。。。\"\n",
359
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
360
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/{MODELNAME}_G_{MODELEPOCH}.pth\n",
361
+ "\n",
362
+ "!echo \"正在删除。。。\"\n",
363
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
364
+ "!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n",
365
+ "\n",
366
+ "!echo \"恢复选中的模型。。。\"\n",
367
+ "!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
368
+ "!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
369
+ "\n",
370
+ "!echo \"删除完成\"\n",
371
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}"
372
+ ]
373
+ },
374
+ {
375
+ "cell_type": "code",
376
+ "execution_count": null,
377
+ "metadata": {
378
+ "id": "QhSiPTVPoIRh"
379
+ },
380
+ "outputs": [],
381
+ "source": [
382
+ "# @title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n",
383
+ "# @markdown 模型名\n",
384
+ "MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
385
+ "# @markdown 选中模型epoch\n",
386
+ "MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
387
+ "\n",
388
+ "!echo \"备份选中的模型。。。\"\n",
389
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
390
+ "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/{MODELNAME}_G_{MODELEPOCH}.pth\n",
391
+ "\n",
392
+ "!echo \"正在删除。。。\"\n",
393
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
394
+ "!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n",
395
+ "\n",
396
+ "!echo \"恢复选中的模型。。。\"\n",
397
+ "!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
398
+ "!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
399
+ "\n",
400
+ "!echo \"删除完成\"\n",
401
+ "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}"
402
+ ]
403
+ }
404
+ ],
405
+ "metadata": {
406
+ "accelerator": "GPU",
407
+ "colab": {
408
+ "private_outputs": true,
409
+ "provenance": []
410
+ },
411
+ "gpuClass": "standard",
412
+ "kernelspec": {
413
+ "display_name": "Python 3",
414
+ "name": "python3"
415
+ },
416
+ "language_info": {
417
+ "name": "python"
418
+ }
419
+ },
420
+ "nbformat": 4,
421
+ "nbformat_minor": 0
422
+ }
Tensorboard.bat ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ setlocal
3
+
4
+ REM Check if tensorboard_venv exists in the root directory
5
+ if not exist "%~dp0\tensorboard_venv\" (
6
+ REM Print the step to the terminal
7
+ echo Installing virtualenv...
8
+
9
+ REM Install virtualenv
10
+ %~dp0\runtime\python -m pip install virtualenv
11
+
12
+ REM Print the step to the terminal
13
+ echo Creating a virtual environment named tensorboard_venv...
14
+
15
+ REM Create a virtual environment named tensorboard_venv in the root directory
16
+ %~dp0\runtime\python -m virtualenv %~dp0\tensorboard_venv
17
+
18
+ REM Print the step to the terminal
19
+ echo Activating the virtual environment...
20
+
21
+ REM Activate the virtual environment
22
+ call %~dp0\tensorboard_venv\Scripts\activate
23
+
24
+ REM Print the step to the terminal
25
+ echo Installing TensorBoard into the virtual environment...
26
+
27
+ REM Install TensorBoard into the virtual environment
28
+ pip install tensorboard
29
+
30
+ REM Downgrade problematic packages
31
+ echo Downgrading packages for troubleshooting...
32
+ pip install markdown==3.0
33
+ pip install tensorboard==2.1.0
34
+ pip install protobuf==3.11.0
35
+ pip install numpy==1.19.5
36
+
37
+ ) else (
38
+ REM Print the step to the terminal
39
+ echo tensorboard_venv already exists, skipping creation and activation...
40
+
41
+ REM Activate the existing virtual environment
42
+ call %~dp0\tensorboard_venv\Scripts\activate
43
+ )
44
+
45
+ REM Print the step to the terminal
46
+ echo Launching TensorBoard...
47
+
48
+ REM Launch TensorBoard
49
+ tensorboard --logdir="%~dp0\logs"
50
+
51
+ REM Print the step to the terminal
52
+ echo Keeping the command prompt open...
53
+
54
+ pause
55
+ endlocal
configs/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"pth_path": "assets/weights/kikiV1.pth", "index_path": "logs/kikiV1.index", "sg_input_device": "VoiceMeeter Output (VB-Audio Vo (MME)", "sg_output_device": "VoiceMeeter Input (VB-Audio Voi (MME)", "threhold": -45.0, "pitch": 2.0, "rms_mix_rate": 0.0, "index_rate": 0.0, "block_time": 0.52, "crossfade_length": 0.15, "extra_time": 2.46, "n_cpu": 6.0, "use_jit": false, "f0method": "rmvpe"}
configs/config.py ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import os
3
+ import sys
4
+ import json
5
+ from multiprocessing import cpu_count
6
+
7
+ import torch
8
+
9
+ try:
10
+ import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import
11
+
12
+ if torch.xpu.is_available():
13
+ from infer.modules.ipex import ipex_init
14
+
15
+ ipex_init()
16
+ except Exception: # pylint: disable=broad-exception-caught
17
+ pass
18
+ import logging
19
+
20
+ logger = logging.getLogger(__name__)
21
+
22
+
23
+ version_config_list = [
24
+ "v1/32k.json",
25
+ "v1/40k.json",
26
+ "v1/48k.json",
27
+ "v2/48k.json",
28
+ "v2/32k.json",
29
+ "v2/OV2-32k.json",
30
+ "v2/OV2-40k.json",
31
+ "v2/Snowie-40k.json",
32
+ "v2/Snowie-48k.json",
33
+ "v2/SnowieV3.1-32k.json",
34
+ "v2/SnowieV3.1-40k.json",
35
+ "v2/SnowieV3.1-48k.json",
36
+ "v2/SnowieV3.1-RinE3-40K.json"
37
+ ]
38
+
39
+
40
+ def singleton_variable(func):
41
+ def wrapper(*args, **kwargs):
42
+ if not wrapper.instance:
43
+ wrapper.instance = func(*args, **kwargs)
44
+ return wrapper.instance
45
+
46
+ wrapper.instance = None
47
+ return wrapper
48
+
49
+
50
+ @singleton_variable
51
+ class Config:
52
+ def __init__(self):
53
+ self.device = "cuda:0"
54
+ self.is_half = True
55
+ self.use_jit = False
56
+ self.n_cpu = 0
57
+ self.gpu_name = None
58
+ self.json_config = self.load_config_json()
59
+ self.gpu_mem = None
60
+ (
61
+ self.python_cmd,
62
+ self.listen_port,
63
+ self.iscolab,
64
+ self.noparallel,
65
+ self.noautoopen,
66
+ self.dml,
67
+ ) = self.arg_parse()
68
+ self.instead = ""
69
+ self.x_pad, self.x_query, self.x_center, self.x_max = self.device_config()
70
+
71
+ @staticmethod
72
+ def load_config_json() -> dict:
73
+ d = {}
74
+ for config_file in version_config_list:
75
+ with open(f"configs/{config_file}", "r") as f:
76
+ d[config_file] = json.load(f)
77
+ return d
78
+
79
+ @staticmethod
80
+ def arg_parse() -> tuple:
81
+ exe = sys.executable or "python"
82
+ parser = argparse.ArgumentParser()
83
+ parser.add_argument("--port", type=int, default=7865, help="Listen port")
84
+ parser.add_argument("--pycmd", type=str, default=exe, help="Python command")
85
+ parser.add_argument("--colab", action="store_true", help="Launch in colab")
86
+ parser.add_argument(
87
+ "--noparallel", action="store_true", help="Disable parallel processing"
88
+ )
89
+ parser.add_argument(
90
+ "--noautoopen",
91
+ action="store_true",
92
+ help="Do not open in browser automatically",
93
+ )
94
+ parser.add_argument(
95
+ "--dml",
96
+ action="store_true",
97
+ help="torch_dml",
98
+ )
99
+ cmd_opts = parser.parse_args()
100
+
101
+ cmd_opts.port = cmd_opts.port if 0 <= cmd_opts.port <= 65535 else 7865
102
+
103
+ return (
104
+ cmd_opts.pycmd,
105
+ cmd_opts.port,
106
+ cmd_opts.colab,
107
+ cmd_opts.noparallel,
108
+ cmd_opts.noautoopen,
109
+ cmd_opts.dml,
110
+ )
111
+
112
+ # has_mps is only available in nightly pytorch (for now) and MasOS 12.3+.
113
+ # check `getattr` and try it for compatibility
114
+ @staticmethod
115
+ def has_mps() -> bool:
116
+ if not torch.backends.mps.is_available():
117
+ return False
118
+ try:
119
+ torch.zeros(1).to(torch.device("mps"))
120
+ return True
121
+ except Exception:
122
+ return False
123
+
124
+ @staticmethod
125
+ def has_xpu() -> bool:
126
+ if hasattr(torch, "xpu") and torch.xpu.is_available():
127
+ return True
128
+ else:
129
+ return False
130
+
131
+ def use_fp32_config(self):
132
+ for config_file in version_config_list:
133
+ self.json_config[config_file]["train"]["fp16_run"] = False
134
+ with open(f"configs/{config_file}", "r") as f:
135
+ strr = f.read().replace("true", "false")
136
+ with open(f"configs/{config_file}", "w") as f:
137
+ f.write(strr)
138
+ with open("infer/modules/train/preprocess.py", "r") as f:
139
+ strr = f.read().replace("3.7", "3.0")
140
+ with open("infer/modules/train/preprocess.py", "w") as f:
141
+ f.write(strr)
142
+ print("overwrite preprocess and configs.json")
143
+
144
+ def device_config(self) -> tuple:
145
+ if torch.cuda.is_available():
146
+ if self.has_xpu():
147
+ self.device = self.instead = "xpu:0"
148
+ self.is_half = True
149
+ i_device = int(self.device.split(":")[-1])
150
+ self.gpu_name = torch.cuda.get_device_name(i_device)
151
+ if (
152
+ ("16" in self.gpu_name and "V100" not in self.gpu_name.upper())
153
+ or "P40" in self.gpu_name.upper()
154
+ or "P10" in self.gpu_name.upper()
155
+ or "1060" in self.gpu_name
156
+ or "1070" in self.gpu_name
157
+ or "1080" in self.gpu_name
158
+ ):
159
+ logger.info("Found GPU %s, force to fp32", self.gpu_name)
160
+ self.is_half = False
161
+ self.use_fp32_config()
162
+ else:
163
+ logger.info("Found GPU %s", self.gpu_name)
164
+ self.gpu_mem = int(
165
+ torch.cuda.get_device_properties(i_device).total_memory
166
+ / 1024
167
+ / 1024
168
+ / 1024
169
+ + 0.4
170
+ )
171
+ if self.gpu_mem <= 4:
172
+ with open("infer/modules/train/preprocess.py", "r") as f:
173
+ strr = f.read().replace("3.7", "3.0")
174
+ with open("infer/modules/train/preprocess.py", "w") as f:
175
+ f.write(strr)
176
+ elif self.has_mps():
177
+ logger.info("No supported Nvidia GPU found")
178
+ self.device = self.instead = "mps"
179
+ self.is_half = False
180
+ self.use_fp32_config()
181
+ else:
182
+ logger.info("No supported Nvidia GPU found")
183
+ self.device = self.instead = "cpu"
184
+ self.is_half = False
185
+ self.use_fp32_config()
186
+
187
+ if self.n_cpu == 0:
188
+ self.n_cpu = cpu_count()
189
+
190
+ if self.is_half:
191
+ # 6G显存配置
192
+ x_pad = 3
193
+ x_query = 10
194
+ x_center = 60
195
+ x_max = 65
196
+ else:
197
+ # 5G显存配置
198
+ x_pad = 1
199
+ x_query = 6
200
+ x_center = 38
201
+ x_max = 41
202
+
203
+ if self.gpu_mem is not None and self.gpu_mem <= 4:
204
+ x_pad = 1
205
+ x_query = 5
206
+ x_center = 30
207
+ x_max = 32
208
+ if self.dml:
209
+ logger.info("Use DirectML instead")
210
+ if (
211
+ os.path.exists(
212
+ "runtime\Lib\site-packages\onnxruntime\capi\DirectML.dll"
213
+ )
214
+ == False
215
+ ):
216
+ try:
217
+ os.rename(
218
+ "runtime\Lib\site-packages\onnxruntime",
219
+ "runtime\Lib\site-packages\onnxruntime-cuda",
220
+ )
221
+ except:
222
+ pass
223
+ try:
224
+ os.rename(
225
+ "runtime\Lib\site-packages\onnxruntime-dml",
226
+ "runtime\Lib\site-packages\onnxruntime",
227
+ )
228
+ except:
229
+ pass
230
+ # if self.device != "cpu":
231
+ import torch_directml
232
+
233
+ self.device = torch_directml.device(torch_directml.default_device())
234
+ self.is_half = False
235
+ else:
236
+ if self.instead:
237
+ logger.info(f"Use {self.instead} instead")
238
+ if (
239
+ os.path.exists(
240
+ "runtime\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
241
+ )
242
+ == False
243
+ ):
244
+ try:
245
+ os.rename(
246
+ "runtime\Lib\site-packages\onnxruntime",
247
+ "runtime\Lib\site-packages\onnxruntime-dml",
248
+ )
249
+ except:
250
+ pass
251
+ try:
252
+ os.rename(
253
+ "runtime\Lib\site-packages\onnxruntime-cuda",
254
+ "runtime\Lib\site-packages\onnxruntime",
255
+ )
256
+ except:
257
+ pass
258
+ print("is_half:%s, device:%s" % (self.is_half, self.device))
259
+ return x_pad, x_query, x_center, x_max
configs/v1/32k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": false,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 32000,
21
+ "filter_length": 1024,
22
+ "hop_length": 320,
23
+ "win_length": 1024,
24
+ "n_mel_channels": 80,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,4,2,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v1/40k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 40000,
21
+ "filter_length": 2048,
22
+ "hop_length": 400,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 125,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v1/48k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 11520,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 48000,
21
+ "filter_length": 2048,
22
+ "hop_length": 480,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 128,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,6,2,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/32k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 32000,
21
+ "filter_length": 1024,
22
+ "hop_length": 320,
23
+ "win_length": 1024,
24
+ "n_mel_channels": 80,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,8,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [20,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/48k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 17280,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 48000,
21
+ "filter_length": 2048,
22
+ "hop_length": 480,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 128,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [12,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [24,20,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/OV2-32k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 32000,
21
+ "filter_length": 1024,
22
+ "hop_length": 320,
23
+ "win_length": 1024,
24
+ "n_mel_channels": 80,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,8,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [20,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/OV2-40k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 40000,
21
+ "filter_length": 2048,
22
+ "hop_length": 400,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 125,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/Snowie-40k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 40000,
21
+ "filter_length": 2048,
22
+ "hop_length": 400,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 125,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/Snowie-48k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 17280,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 48000,
21
+ "filter_length": 2048,
22
+ "hop_length": 480,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 128,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [12,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [24,20,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/SnowieV3.1-32k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 32000,
21
+ "filter_length": 1024,
22
+ "hop_length": 320,
23
+ "win_length": 1024,
24
+ "n_mel_channels": 80,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,8,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [20,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/SnowieV3.1-40k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 40000,
21
+ "filter_length": 2048,
22
+ "hop_length": 400,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 125,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/SnowieV3.1-48k.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 40000,
21
+ "filter_length": 2048,
22
+ "hop_length": 400,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 125,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
configs/v2/SnowieV3.1-RinE3-40K.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train": {
3
+ "log_interval": 200,
4
+ "seed": 1234,
5
+ "epochs": 20000,
6
+ "learning_rate": 1e-4,
7
+ "betas": [0.8, 0.99],
8
+ "eps": 1e-9,
9
+ "batch_size": 4,
10
+ "fp16_run": true,
11
+ "lr_decay": 0.999875,
12
+ "segment_size": 12800,
13
+ "init_lr_ratio": 1,
14
+ "warmup_epochs": 0,
15
+ "c_mel": 45,
16
+ "c_kl": 1.0
17
+ },
18
+ "data": {
19
+ "max_wav_value": 32768.0,
20
+ "sampling_rate": 40000,
21
+ "filter_length": 2048,
22
+ "hop_length": 400,
23
+ "win_length": 2048,
24
+ "n_mel_channels": 125,
25
+ "mel_fmin": 0.0,
26
+ "mel_fmax": null
27
+ },
28
+ "model": {
29
+ "inter_channels": 192,
30
+ "hidden_channels": 192,
31
+ "filter_channels": 768,
32
+ "n_heads": 2,
33
+ "n_layers": 6,
34
+ "kernel_size": 3,
35
+ "p_dropout": 0,
36
+ "resblock": "1",
37
+ "resblock_kernel_sizes": [3,7,11],
38
+ "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
39
+ "upsample_rates": [10,10,2,2],
40
+ "upsample_initial_channel": 512,
41
+ "upsample_kernel_sizes": [16,16,4,4],
42
+ "use_spectral_norm": false,
43
+ "gin_channels": 256,
44
+ "spk_embed_dim": 109
45
+ }
46
+ }
docker-compose.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: "3.8"
2
+ services:
3
+ rvc:
4
+ build:
5
+ context: .
6
+ dockerfile: Dockerfile
7
+ container_name: rvc
8
+ volumes:
9
+ - ./weights:/app/assets/weights
10
+ - ./opt:/app/opt
11
+ # - ./dataset:/app/dataset # you can use this folder in order to provide your dataset for model training
12
+ ports:
13
+ - 7865:7865
14
+ deploy:
15
+ resources:
16
+ reservations:
17
+ devices:
18
+ - driver: nvidia
19
+ count: 1
20
+ capabilities: [gpu]
docs/cn/Changelog_CN.md ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 20231006更新
2
+
3
+ 我们制作了一个用于实时变声的界面go-realtime-gui.bat/gui_v1.py(事实上早就存在了),本次更新重点也优化了实时变声的性能。对比0813版:
4
+ - 1、优优化界面操作:参数热更新(调整参数不需要中止再启动),懒加载模型(已加载过的模型不需要重新加载),增加响度因子参数(响度向输入音频靠近)
5
+ - 2、优化自带降噪效果与速度
6
+ - 3、大幅优化推理速度
7
+
8
+ 注意输入输出设备应该选择同种类型,例如都选MME类型。
9
+
10
+ 1006版本整体的更新为:
11
+ - 1、继续提升rmvpe音高提取算法效果,对于男低音有更大的提升
12
+ - 2、优化推理界面布局
13
+
14
+ ### 20230813更新
15
+ 1-常规bug修复
16
+ - 保存频率总轮数最低改为1 总轮数最低改为2
17
+ - 修复无pretrain模型训练报错
18
+ - 增加伴奏人声分离完毕清理显存
19
+ - faiss保存路径绝对路径改为相对路径
20
+ - 支持路径包含空格(训练集路径+实验名称均支持,不再会报错)
21
+ - filelist取消强制utf8编码
22
+ - 解决实时变声中开启索引导致的CPU极大占用问题
23
+
24
+ 2-重点更新
25
+ - 训练出当前最强开源人声音高提取模型RMVPE,并用于RVC的训练、离线/实时推理,支持pytorch/onnx/DirectML
26
+ - 通过pytorch-dml支持A卡和I卡的
27
+ (1)实时变声(2)推理(3)人声伴奏分离(4)训练暂未支持,会切换至CPU训练;通过onnx_dml支持rmvpe_gpu的推理
28
+
29
+ ### 20230618更新
30
+ - v2增加32k和48k两个新预训练模型
31
+ - 修复非f0模型推理报错
32
+ - 对于超过一小时的训练集的索引建立环节,自动kmeans缩小特征处理以加速索引训练、加入和查询
33
+ - 附送一个人声转吉他玩具仓库
34
+ - 数据处理剔除异常值切片
35
+ - onnx导出选项卡
36
+
37
+ 失败的实验:
38
+ - ~~特征检索增加时序维度:寄,没啥效果~~
39
+ - ~~特征检索增加PCAR降维可选项:寄,数据大用kmeans缩小数据量,数据小降维操作耗时比省下的匹配耗时还多~~
40
+ - ~~支持onnx推理(附带仅推理的小压缩包):寄,生成nsf还是需要pytorch~~
41
+ - ~~训练时在音高、gender、eq、噪声等方面对输入进行随机增强:寄,没啥效果~~
42
+ - ~~接入小型声码器调研:寄,效果变差~~
43
+
44
+ todolist:
45
+ - ~~训练集音高识别支持crepe:已经被RMVPE取代,不需要~~
46
+ - ~~多进程harvest推理:已经被RMVPE取代,不需要~~
47
+ - ~~crepe的精度支持和RVC-config同步:已经被RMVPE取代,不需要。支持这个还要同步torchcrepe的库,麻烦~~
48
+ - 对接F0编辑器
49
+
50
+
51
+ ### 20230528更新
52
+ - 增加v2的jupyter notebook,韩文changelog,增加一些环境依赖
53
+ - 增加呼吸、清辅音、齿音保护模式
54
+ - 支持crepe-full推理
55
+ - UVR5人声伴奏分离加上3个去延迟模型和MDX-Net去混响模型,增加HP3人声提取模型
56
+ - 索引名称增加版本和实验名称
57
+ - 人声伴奏分离、推理批量导出增加音频导出格式选项
58
+ - 废弃32k模型的训练
59
+
60
+ ### 20230513更新
61
+ - 清除一键包内部老版本runtime内残留的lib.infer_pack和uvr5_pack
62
+ - 修复训练集预处理伪多进程的bug
63
+ - 增加harvest识别音高可选通过中值滤波削弱哑音现象,可调整中值滤波半径
64
+ - 导出音频增加后处理重采样
65
+ - 训练n_cpu进程数从"仅调整f0提取"改为"调整数据预处理和f0提取"
66
+ - 自动检测logs文件夹下的index路径,提供下拉列表功能
67
+ - tab页增加"常见问题解答"(也可参考github-rvc-wiki)
68
+ - 相同路径的输入音频推理增加了音高缓存(用途:使用harvest音高提取,整个pipeline会经历漫长且重复的音高提取过程,如果不使用缓存,实验不同音色、索引、音高中值滤波半径参数的用户在第一次测试后的等待结果会非常痛苦)
69
+
70
+ ### 20230514更新
71
+ - 音量包络对齐输入混合(可以缓解“输入静音输出小幅度噪声”的问题。如果输入音频背景底噪大则不建议开启,默认不开启(值为1可视为不开启))
72
+ - 支持按照指定频率保存提取的小模型(假如你想尝试不同epoch下的推理效果,但是不想保存所有大checkpoint并且每次都要ckpt手工处理提取小模型,这项功能会非常实用)
73
+ - 通过设置环境变量解决服务端开了系统全局代理导致浏览器连接错误的问题
74
+ - 支持v2预训练模型(目前只公开了40k版本进行测试,另外2个采样率还没有训练完全)
75
+ - 推理前限制超过1的过大音量
76
+ - 微调数据预处理参数
77
+
78
+
79
+ ### 20230409更新
80
+ - 修正训练参数,提升显卡平均利用率,A100最高从25%提升至90%左右,V100:50%->90%左右,2060S:60%->85%左右,P40:25%->95%左右,训练速度显著提升
81
+ - 修正参数:总batch_size改为每张卡的batch_size
82
+ - 修正total_epoch:最大限制100解锁至1000;默认10提升至默认20
83
+ - 修复ckpt提取识别是否带音高错误导致推理异常的问题
84
+ - 修复分布式训练每个rank都保存一次ckpt���问题
85
+ - 特征提取进行nan特征过滤
86
+ - 修复静音输入输出随机辅音or噪声的问题(老版模型需要重做训练集重训)
87
+
88
+ ### 20230416更新
89
+ - 新增本地实时变声迷你GUI,双击go-realtime-gui.bat启动
90
+ - 训练推理均对<50Hz的频段进行滤波过滤
91
+ - 训练推理音高提取pyworld最低音高从默认80下降至50,50-80hz间的男声低音不会哑
92
+ - WebUI支持根据系统区域变更语言(现支持en_US,ja_JP,zh_CN,zh_HK,zh_SG,zh_TW,不支持的默认en_US)
93
+ - 修正部分显卡识别(例如V100-16G识别失败,P4识别失败)
94
+
95
+ ### 20230428更新
96
+ - 升级faiss索引设置,速度更快,质量更高
97
+ - 取消total_npy依赖,后续分享模型不再需要填写total_npy
98
+ - 解锁16系限制。4G显存GPU给到4G的推理设置。
99
+ - 修复部分音频格式下UVR5人声伴奏分离的bug
100
+ - 实时变声迷你gui增加对非40k与不懈怠音高模型的支持
101
+
102
+ ### 后续计划:
103
+ 功能:
104
+ - 支持多人训练选项卡(至多4人)
105
+
106
+ 底模:
107
+ - 收集呼吸wav加入训练集修正呼吸变声电音的问题
108
+ - 我们正在训练增加了歌声训练集的底模,未来会公开
109
+
docs/cn/faq.md ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Q1:ffmpeg error/utf8 error.
2
+
3
+ 大概率不是ffmpeg问题,而是音频路径问题;<br>
4
+ ffmpeg读取路径带空格、()等特殊符号,可能出现ffmpeg error;训练集音频带中文路径,在写入filelist.txt的时候可能出现utf8 error;<br>
5
+
6
+ ## Q2:一键训练结束没有索引
7
+
8
+ 显示"Training is done. The program is closed."则模型训练成功,后续紧邻的报错是假的;<br>
9
+
10
+ 一键训练结束完成没有added开头的索引文件,可能是因为训练集太大卡住了添加索引的步骤;已通过批处理add索引解决内存add索引对内存需求过大的问题。临时可尝试再次点击"训练索引"按钮。<br>
11
+
12
+ ## Q3:训练结束推理没看到训练集的音色
13
+ 点刷新音色再看看,如果还没有看看训练有没有报错,控制台和webui的截图,logs/实验名下的log,都可以发给开发者看看。<br>
14
+
15
+ ## Q4:如何分享模型
16
+   rvc_root/logs/实验名 下面存储的pth不是用来分享模型用来推理的,而是为了存储实验状态供复现,以及继续训练用的。用来分享的模型应该是weights文件夹下大小为60+MB的pth文件;<br>
17
+   后续将把weights/exp_name.pth和logs/exp_name/added_xxx.index合并打包成weights/exp_name.zip省去填写index的步骤,那么zip文件用来分享,不要分享pth文件,除非是想换机器继续训练;<br>
18
+   如果你把logs文件夹下的几百MB的pth文件复制/分享到weights文件夹下强行用于推理,可能会出现f0,tgt_sr等各种key不存在的报错。你需要用ckpt选项卡最下面,手工或自动(本地logs下如果能找到相关信息则会自动)选择是否携带音高、目标音频采样率的选项后进行ckpt小模型提取(输入路径填G开头的那个),提取完在weights文件夹下会出现60+MB的pth文件,刷新音色后可以选择使用。<br>
19
+
20
+ ## Q5:Connection Error.
21
+ 也许你关闭了控制台(黑色窗口)。<br>
22
+
23
+ ## Q6:WebUI弹出Expecting value: line 1 column 1 (char 0).
24
+ 请关闭系统局域网代理/全局代理。<br>
25
+
26
+ 这个不仅是客户端的代理,也包括服务端的代理(例如你使用autodl设置了http_proxy和https_proxy学术加速,使用时也需要unset关掉)<br>
27
+
28
+ ## Q7:不用WebUI如何通过命令训练推理
29
+ 训练脚本:<br>
30
+ 可先跑通WebUI,消息窗内会显示数据集处理和训练用命令行;<br>
31
+
32
+ 推理脚本:<br>
33
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/myinfer.py<br>
34
+
35
+ 例子:<br>
36
+
37
+ runtime\python.exe myinfer.py 0 "E:\codes\py39\RVC-beta\todo-songs\1111.wav" "E:\codes\py39\logs\mi-test\added_IVF677_Flat_nprobe_7.index" harvest "test.wav" "weights/mi-test.pth" 0.6 cuda:0 True<br>
38
+
39
+ f0up_key=sys.argv[1]<br>
40
+ input_path=sys.argv[2]<br>
41
+ index_path=sys.argv[3]<br>
42
+ f0method=sys.argv[4]#harvest or pm<br>
43
+ opt_path=sys.argv[5]<br>
44
+ model_path=sys.argv[6]<br>
45
+ index_rate=float(sys.argv[7])<br>
46
+ device=sys.argv[8]<br>
47
+ is_half=bool(sys.argv[9])<br>
48
+
49
+ ## Q8:Cuda error/Cuda out of memory.
50
+ 小概率是cuda配置问题、设备不支持;大概率是显存不够(out of memory);<br>
51
+
52
+ 训练的话缩小batch size(如果缩小到1还不够只能更换显卡训练),推理的话酌情缩小config.py结尾的x_pad,x_query,x_center,x_max。4G以下显存(例如1060(3G)和各种2G显卡)可以直接放弃,4G显存显卡还有救。<br>
53
+
54
+ ## Q9:total_epoch调多少比较好
55
+
56
+ 如果训练集音质差底噪大,20~30足够了,调太高,底模音质无法带高你的低音质训练集<br>
57
+ 如果训练集音质高底噪低时长多,可以调高,200是ok的(训练速度很快,既然你有条件准备高音质训练集,显卡想必条件也不错,肯定不在乎多一些训练时间)<br>
58
+
59
+ ## Q10:需要多少训练集时长
60
+   推荐10min至50min<br>
61
+   保证音质高底噪低的情况下,如果有个人特色的音色统一,则多多益善<br>
62
+   高水平的训练集(精简+音色有特色),5min至10min也是ok的,仓库作者本人就经常这么玩<br>
63
+   也有人拿1min至2min的数据来训练并且训练成功的,但是成功经验是其他人不可复现的,不太具备参考价值。这要求训练集音色特色非常明显(比如说高频气声较明显的萝莉少女音),且音质高;<br>
64
+   1min以下时长数据目前没见有人尝试(成功)过。不建议进行这种鬼畜行为。<br>
65
+
66
+ ## Q11:index rate干嘛用的,怎么调(科普)
67
+   如果底模和推理源的音质高于训练集的音质,他们可以带高推理结果的音质,但代价可能是音色往底模/推理源的音色靠,这种现象叫做"音色泄露";<br>
68
+   index rate用来削减/解决音色泄露问题。调到1,则理论上不存在推理源的音色泄露问题,但音质更倾向于训练集。如果训练集音质比推理源低,则index rate调高可能降低音质。调到0,则不具备利用检索混合来保护训练集音色的效果;<br>
69
+   如果训练集优质时长多,可调高total_epoch,此时模型本身不太会引用推理源和底模的音色,很少存在"音色泄露"问题,此时index_rate不重要,你甚至可以不建立/分享index索引文件。<br>
70
+
71
+ ## Q11:推理怎么选gpu
72
+ config.py文件里device cuda:后面选择卡号;<br>
73
+ 卡号和显卡的映射关系,在训练选项卡的显卡信息栏里能看到。<br>
74
+
75
+ ## Q12:如何推理训练中间保存的pth
76
+ 通过ckpt选项卡最下面提取小模型。<br>
77
+
78
+
79
+ ## Q13:如何中断和继续训练
80
+ 现阶段只能关闭WebUI控制台双击go-web.bat重启程序。网页参数也要刷新重新填写;<br>
81
+ 继续训练:相同网页参数点训练模型,就会接着上次的checkpoint继续训练。<br>
82
+
83
+ ## Q14:训练时出现文件页面/内存error
84
+ 进程开太多了,内存炸了。你可能可以通过如下方式解决<br>
85
+ 1、"提取音高和处理数据使用的CPU进程数" 酌情拉低;<br>
86
+ 2、训练集音频手工切一下,不要太长。<br>
87
+
88
+
89
+ ## Q15:如何中途加数据训练
90
+ 1、所有数据新建一个实验名;<br>
91
+ 2、拷贝上一次的最新的那个G和D文件(或者你想基于哪个中间ckpt训练,也可以拷贝中间的)到新实验名;下<br>
92
+ 3、一键训练新实验名,他会继续上一次的最新进度训练。<br>
93
+
94
+ ## Q16: error about llvmlite.dll
95
+
96
+ OSError: Could not load shared object file: llvmlite.dll
97
+
98
+ FileNotFoundError: Could not find module lib\site-packages\llvmlite\binding\llvmlite.dll (or one of its dependencies). Try using the full path with constructor syntax.
99
+
100
+ win平台会报这个错,装上https://aka.ms/vs/17/release/vc_redist.x64.exe这个再重启WebUI就好了。
101
+
102
+ ## Q17: RuntimeError: The expanded size of the tensor (17280) must match the existing size (0) at non-singleton dimension 1. Target sizes: [1, 17280]. Tensor sizes: [0]
103
+
104
+ wavs16k文件夹下,找到文件大小显著比其他都小的一些音频文件,删掉,点击训练模型,就不会报错了,不过由于一键流程中断了你训练完模型还要点训练索引。
105
+
106
+ ## Q18: RuntimeError: The size of tensor a (24) must match the size of tensor b (16) at non-singleton dimension 2
107
+
108
+ 不要中途变更采样率继续训练。如果一定要变更,应更换实验名从头训练。当然你也可以把上次提取的音高和特征(0/1/2/2b folders)拷贝过去加速训练流程。
docs/en/Changelog_EN.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 2023-10-06
2
+ - We have created a GUI for real-time voice change: go-realtime-gui.bat/gui_v1.py (Note that you should choose the same type of input and output device, e.g. MME and MME).
3
+ - We trained a better pitch extract RMVPE model.
4
+ - Optimize inference GUI layout.
5
+
6
+ ### 2023-08-13
7
+ 1-Regular bug fix
8
+ - Change the minimum total epoch number to 1, and change the minimum total epoch number to 2
9
+ - Fix training errors of not using pre-train models
10
+ - After accompaniment vocals separation, clear graphics memory
11
+ - Change faiss save path absolute path to relative path
12
+ - Support path containing spaces (both training set path and experiment name are supported, and errors will no longer be reported)
13
+ - Filelist cancels mandatory utf8 encoding
14
+ - Solve the CPU consumption problem caused by faiss searching during real-time voice changes
15
+
16
+ 2-Key updates
17
+ - Train the current strongest open-source vocal pitch extraction model RMVPE, and use it for RVC training, offline/real-time inference, supporting PyTorch/Onnx/DirectML
18
+ - Support for AMD and Intel graphics cards through Pytorch_DML
19
+
20
+ (1) Real time voice change (2) Inference (3) Separation of vocal accompaniment (4) Training not currently supported, will switch to CPU training; supports RMVPE inference of gpu by Onnx_Dml
21
+
22
+
23
+ ### 2023-06-18
24
+ - New pretrained v2 models: 32k and 48k
25
+ - Fix non-f0 model inference errors
26
+ - For training-set exceeding 1 hour, do automatic minibatch-kmeans to reduce feature shape, so that index training, adding, and searching will be much faster.
27
+ - Provide a toy vocal2guitar huggingface space
28
+ - Auto delete outlier short cut training-set audios
29
+ - Onnx export tab
30
+
31
+ Failed experiments:
32
+ - ~~Feature retrieval: add temporal feature retrieval: not effective~~
33
+ - ~~Feature retrieval: add PCAR dimensionality reduction: searching is even slower~~
34
+ - ~~Random data augmentation when training: not effective~~
35
+
36
+ todolist:
37
+ - ~~Vocos-RVC (tiny vocoder): not effective~~
38
+ - ~~Crepe support for training:replaced by RMVPE~~
39
+ - ~~Half precision crepe inference:replaced by RMVPE. And hard to achive.~~
40
+ - F0 editor support
41
+
42
+ ### 2023-05-28
43
+ - Add v2 jupyter notebook, korean changelog, fix some environment requirments
44
+ - Add voiceless consonant and breath protection mode
45
+ - Support crepe-full pitch detect
46
+ - UVR5 vocal separation: support dereverb models and de-echo models
47
+ - Add experiment name and version on the name of index
48
+ - Support users to manually select export format of output audios when batch voice conversion processing and UVR5 vocal separation
49
+ - v1 32k model training is no more supported
50
+
51
+ ### 2023-05-13
52
+ - Clear the redundant codes in the old version of runtime in the one-click-package: lib.infer_pack and uvr5_pack
53
+ - Fix pseudo multiprocessing bug in training set preprocessing
54
+ - Adding median filtering radius adjustment for harvest pitch recognize algorithm
55
+ - Support post processing resampling for exporting audio
56
+ - Multi processing "n_cpu" setting for training is changed from "f0 extraction" to "data preprocessing and f0 extraction"
57
+ - Automatically detect the index paths under the logs folder and provide a drop-down list function
58
+ - Add "Frequently Asked Questions and Answers" on the tab page (you can also refer to github RVC wiki)
59
+ - When inference, harvest pitch is cached when using same input audio path (purpose: using harvest pitch extraction, the entire pipeline will go through a long and repetitive pitch extraction process. If caching is not used, users who experiment with different timbre, index, and pitch median filtering radius settings will experience a very painful waiting process after the first inference)
60
+
61
+ ### 2023-05-14
62
+ - Use volume envelope of input to mix or replace the volume envelope of output (can alleviate the problem of "input muting and output small amplitude noise". If the input audio background noise is high, it is not recommended to turn it on, and it is not turned on by default (1 can be considered as not turned on)
63
+ - Support saving extracted small models at a specified frequency (if you want to see the performance under different epochs, but do not want to save all large checkpoints and manually extract small models by ckpt-processing every time, this feature will be very practical)
64
+ - Resolve the issue of "connection errors" caused by the server's global proxy by setting environment variables
65
+ - Supports pre-trained v2 models (currently only 40k versions are publicly available for testing, and the other two sampling rates have not been fully trained yet)
66
+ - Limit excessive volume exceeding 1 before inference
67
+ - Slightly adjusted the settings of training-set preprocessing
68
+
69
+
70
+ #######################
71
+
72
+ History changelogs:
73
+
74
+ ### 2023-04-09
75
+ - Fixed training parameters to improve GPU utilization rate: A100 increased from 25% to around 90%, V100: 50% to around 90%, 2060S: 60% to around 85%, P40: 25% to around 95%; significantly improved training speed
76
+ - Changed parameter: total batch_size is now per GPU batch_size
77
+ - Changed total_epoch: maximum limit increased from 100 to 1000; default increased from 10 to 20
78
+ - Fixed issue of ckpt extraction recognizing pitch incorrectly, causing abnormal inference
79
+ - Fixed issue of distributed training saving ckpt for each rank
80
+ - Applied nan feature filtering for feature extraction
81
+ - Fixed issue with silent input/output producing random consonants or noise (old models need to retrain with a new dataset)
82
+
83
+ ### 2023-04-16 Update
84
+ - Added local real-time voice changing mini-GUI, start by double-clicking go-realtime-gui.bat
85
+ - Applied filtering for frequency bands below 50Hz during training and inference
86
+ - Lowered the minimum pitch extraction of pyworld from the default 80 to 50 for training and inference, allowing male low-pitched voices between 50-80Hz not to be muted
87
+ - WebUI supports changing languages according to system locale (currently supporting en_US, ja_JP, zh_CN, zh_HK, zh_SG, zh_TW; defaults to en_US if not supported)
88
+ - Fixed recognition of some GPUs (e.g., V100-16G recognition failure, P4 recognition failure)
89
+
90
+ ### 2023-04-28 Update
91
+ - Upgraded faiss index settings for faster speed and higher quality
92
+ - Removed dependency on total_npy; future model sharing will not require total_npy input
93
+ - Unlocked restrictions for the 16-series GPUs, providing 4GB inference settings for 4GB VRAM GPUs
94
+ - Fixed bug in UVR5 vocal accompaniment separation for certain audio formats
95
+ - Real-time voice changing mini-GUI now supports non-40k and non-lazy pitch models
96
+
97
+ ### Future Plans:
98
+ Features:
99
+ - Add option: extract small models for each epoch save
100
+ - Add option: export additional mp3 to the specified path during inference
101
+ - Support multi-person training tab (up to 4 people)
102
+
103
+ Base model:
104
+ - Collect breathing wav files to add to the training dataset to fix the issue of distorted breath sounds
105
+ - We are currently training a base model with an extended singing dataset, which will be released in the future
docs/en/README.en.md ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <h1>Retrieval-based-Voice-Conversion-WebUI</h1>
4
+ An easy-to-use Voice Conversion framework based on VITS.<br><br>
5
+
6
+ [![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
7
+ )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
8
+
9
+ <img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
10
+
11
+ [![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
12
+ [![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)
13
+ [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
14
+
15
+ [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
16
+
17
+ </div>
18
+
19
+ ------
20
+ [**Changelog**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/Changelog_EN.md) | [**FAQ (Frequently Asked Questions)**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/wiki/FAQ-(Frequently-Asked-Questions))
21
+
22
+ [**English**](../en/README.en.md) | [**中文简体**](../../README.md) | [**日本語**](../jp/README.ja.md) | [**한국어**](../kr/README.ko.md) ([**韓國語**](../kr/README.ko.han.md)) | [**Türkçe**](../tr/README.tr.md)
23
+
24
+
25
+ Check our [Demo Video](https://www.bilibili.com/video/BV1pm4y1z7Gm/) here!
26
+
27
+ Training/Inference WebUI:go-web.bat
28
+
29
+ ![image](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/assets/129054828/00387c1c-51b1-4010-947d-3f3ecac95b87)
30
+
31
+ Realtime Voice Conversion GUI:go-realtime-gui.bat
32
+
33
+ ![image](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/assets/129054828/143246a9-8b42-4dd1-a197-430ede4d15d7)
34
+
35
+ > The dataset for the pre-training model uses nearly 50 hours of high quality VCTK open source dataset.
36
+
37
+ > High quality licensed song datasets will be added to training-set one after another for your use, without worrying about copyright infringement.
38
+
39
+ > 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.
40
+
41
+ ## Summary
42
+ This repository has the following features:
43
+ + Reduce tone leakage by replacing the source feature to training-set feature using top1 retrieval;
44
+ + Easy and fast training, even on relatively poor graphics cards;
45
+ + Training with a small amount of data also obtains relatively good results (>=10min low noise speech recommended);
46
+ + Supporting model fusion to change timbres (using ckpt processing tab->ckpt merge);
47
+ + Easy-to-use Webui interface;
48
+ + Use the UVR5 model to quickly separate vocals and instruments.
49
+ + Use the most powerful High-pitch Voice Extraction Algorithm [InterSpeech2023-RMVPE](#Credits) to prevent the muted sound problem. Provides the best results (significantly) and is faster, with even lower resource consumption than Crepe_full.
50
+ + AMD/Intel graphics cards acceleration supported.
51
+ + Intel ARC graphics cards acceleration with IPEX supported.
52
+
53
+ ## Preparing the environment
54
+ The following commands need to be executed in the environment of Python version 3.8 or higher.
55
+
56
+ (Windows/Linux)
57
+ First install the main dependencies through pip:
58
+ ```bash
59
+ # Install PyTorch-related core dependencies, skip if installed
60
+ # Reference: https://pytorch.org/get-started/locally/
61
+ pip install torch torchvision torchaudio
62
+
63
+ #For Windows + Nvidia Ampere Architecture(RTX30xx), you need to specify the cuda version corresponding to pytorch according to the experience of https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/21
64
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
65
+
66
+ #For Linux + AMD Cards, you need to use the following pytorch versions:
67
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2
68
+ ```
69
+
70
+ Then can use poetry to install the other dependencies:
71
+ ```bash
72
+ # Install the Poetry dependency management tool, skip if installed
73
+ # Reference: https://python-poetry.org/docs/#installation
74
+ curl -sSL https://install.python-poetry.org | python3 -
75
+
76
+ # Install the project dependencies
77
+ poetry install
78
+ ```
79
+
80
+ You can also use pip to install them:
81
+ ```bash
82
+
83
+ for Nvidia graphics cards
84
+ pip install -r requirements.txt
85
+
86
+ for AMD/Intel graphics cards on Windows (DirectML):
87
+ pip install -r requirements-dml.txt
88
+
89
+ for Intel ARC graphics cards on Linux / WSL using Python 3.10:
90
+ pip install -r requirements-ipex.txt
91
+
92
+ for AMD graphics cards on Linux (ROCm):
93
+ pip install -r requirements-amd.txt
94
+ ```
95
+
96
+ ------
97
+ Mac users can install dependencies via `run.sh`:
98
+ ```bash
99
+ sh ./run.sh
100
+ ```
101
+
102
+ ## Preparation of other Pre-models
103
+ RVC requires other pre-models to infer and train.
104
+
105
+ ```bash
106
+ #Download all needed models from https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/
107
+ python tools/download_models.py
108
+ ```
109
+
110
+ Or just download them by yourself from our [Huggingface space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/).
111
+
112
+ Here's a list of Pre-models and other files that RVC needs:
113
+ ```bash
114
+ ./assets/hubert/hubert_base.pt
115
+
116
+ ./assets/pretrained
117
+
118
+ ./assets/uvr5_weights
119
+
120
+ Additional downloads are required if you want to test the v2 version of the model.
121
+
122
+ ./assets/pretrained_v2
123
+
124
+ If you want to test the v2 version model (the v2 version model has changed the input from the 256 dimensional feature of 9-layer Hubert+final_proj to the 768 dimensional feature of 12-layer Hubert, and has added 3 period discriminators), you will need to download additional features
125
+
126
+ ./assets/pretrained_v2
127
+
128
+ #If you are using Windows, you may also need these two files, skip if FFmpeg and FFprobe are installed
129
+ ffmpeg.exe
130
+
131
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe
132
+
133
+ ffprobe.exe
134
+
135
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe
136
+
137
+ If you want to use the latest SOTA RMVPE vocal pitch extraction algorithm, you need to download the RMVPE weights and place them in the RVC root directory
138
+
139
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.pt
140
+
141
+ For AMD/Intel graphics cards users you need download:
142
+
143
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.onnx
144
+
145
+ ```
146
+
147
+ Intel ARC graphics cards users needs to run `source /opt/intel/oneapi/setvars.sh` command before starting Webui.
148
+
149
+ Then use this command to start Webui:
150
+ ```bash
151
+ python infer-web.py
152
+ ```
153
+
154
+ If you are using Windows or macOS, you can download and extract `RVC-beta.7z` to use RVC directly by using `go-web.bat` on windows or `sh ./run.sh` on macOS to start Webui.
155
+
156
+ ## ROCm Support for AMD graphic cards (Linux only)
157
+ To use ROCm on Linux install all required drivers as described [here](https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html).
158
+
159
+ On Arch use pacman to install the driver:
160
+ ````
161
+ pacman -S rocm-hip-sdk rocm-opencl-sdk
162
+ ````
163
+
164
+ You might also need to set these environment variables (e.g. on a RX6700XT):
165
+ ````
166
+ export ROCM_PATH=/opt/rocm
167
+ export HSA_OVERRIDE_GFX_VERSION=10.3.0
168
+ ````
169
+ Also make sure your user is part of the `render` and `video` group:
170
+ ````
171
+ sudo usermod -aG render $USERNAME
172
+ sudo usermod -aG video $USERNAME
173
+ ````
174
+ After that you can run the WebUI:
175
+ ```bash
176
+ python infer-web.py
177
+ ```
178
+
179
+ ## Credits
180
+ + [ContentVec](https://github.com/auspicious3000/contentvec/)
181
+ + [VITS](https://github.com/jaywalnut310/vits)
182
+ + [HIFIGAN](https://github.com/jik876/hifi-gan)
183
+ + [Gradio](https://github.com/gradio-app/gradio)
184
+ + [FFmpeg](https://github.com/FFmpeg/FFmpeg)
185
+ + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
186
+ + [audio-slicer](https://github.com/openvpi/audio-slicer)
187
+ + [Vocal pitch extraction:RMVPE](https://github.com/Dream-High/RMVPE)
188
+ + The pretrained model is trained and tested by [yxlllc](https://github.com/yxlllc/RMVPE) and [RVC-Boss](https://github.com/RVC-Boss).
189
+
190
+ ## Thanks to all contributors for their efforts
191
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
192
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
193
+ </a>
194
+
docs/en/faiss_tips_en.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ faiss tuning TIPS
2
+ ==================
3
+ # about faiss
4
+ faiss is a library of neighborhood searches for dense vectors, developed by facebook research, which efficiently implements many approximate neighborhood search methods.
5
+ Approximate Neighbor Search finds similar vectors quickly while sacrificing some accuracy.
6
+
7
+ ## faiss in RVC
8
+ In RVC, for the embedding of features converted by HuBERT, we search for embeddings similar to the embedding generated from the training data and mix them to achieve a conversion that is closer to the original speech. However, since this search takes time if performed naively, high-speed conversion is realized by using approximate neighborhood search.
9
+
10
+ # implementation overview
11
+ In '/logs/your-experiment/3_feature256' where the model is located, features extracted by HuBERT from each voice data are located.
12
+ From here we read the npy files in order sorted by filename and concatenate the vectors to create big_npy. (This vector has shape [N, 256].)
13
+ After saving big_npy as /logs/your-experiment/total_fea.npy, train it with faiss.
14
+
15
+ In this article, I will explain the meaning of these parameters.
16
+
17
+ # Explanation of the method
18
+ ## index factory
19
+ An index factory is a unique faiss notation that expresses a pipeline that connects multiple approximate neighborhood search methods as a string.
20
+ This allows you to try various approximate neighborhood search methods simply by changing the index factory string.
21
+ In RVC it is used like this:
22
+
23
+ ```python
24
+ index = faiss.index_factory(256, "IVF%s,Flat" % n_ivf)
25
+ ```
26
+ Among the arguments of index_factory, the first is the number of dimensions of the vector, the second is the index factory string, and the third is the distance to use.
27
+
28
+ For more detailed notation
29
+ https://github.com/facebookresearch/faiss/wiki/The-index-factory
30
+
31
+ ## index for distance
32
+ There are two typical indexes used as similarity of embedding as follows.
33
+
34
+ - Euclidean distance (METRIC_L2)
35
+ - inner product (METRIC_INNER_PRODUCT)
36
+
37
+ Euclidean distance takes the squared difference in each dimension, sums the differences in all dimensions, and then takes the square root. This is the same as the distance in 2D and 3D that we use on a daily basis.
38
+ The inner product is not used as an index of similarity as it is, and the cosine similarity that takes the inner product after being normalized by the L2 norm is generally used.
39
+
40
+ Which is better depends on the case, but cosine similarity is often used in embedding obtained by word2vec and similar image retrieval models learned by ArcFace. If you want to do l2 normalization on vector X with numpy, you can do it with the following code with eps small enough to avoid 0 division.
41
+
42
+ ```python
43
+ X_normed = X / np.maximum(eps, np.linalg.norm(X, ord=2, axis=-1, keepdims=True))
44
+ ```
45
+
46
+ Also, for the index factory, you can change the distance index used for calculation by choosing the value to pass as the third argument.
47
+
48
+ ```python
49
+ index = faiss.index_factory(dimention, text, faiss.METRIC_INNER_PRODUCT)
50
+ ```
51
+
52
+ ## IVF
53
+ IVF (Inverted file indexes) is an algorithm similar to the inverted index in full-text search.
54
+ During learning, the search target is clustered with kmeans, and Voronoi partitioning is performed using the cluster center. Each data point is assigned a cluster, so we create a dictionary that looks up the data points from the clusters.
55
+
56
+ For example, if clusters are assigned as follows
57
+ |index|Cluster|
58
+ |-----|-------|
59
+ |1|A|
60
+ |2|B|
61
+ |3|A|
62
+ |4|C|
63
+ |5|B|
64
+
65
+ The resulting inverted index looks like this:
66
+
67
+ |cluster|index|
68
+ |-------|-----|
69
+ |A|1, 3|
70
+ |B|2, 5|
71
+ |C|4|
72
+
73
+ When searching, we first search n_probe clusters from the clusters, and then calculate the distances for the data points belonging to each cluster.
74
+
75
+ # recommend parameter
76
+ There are official guidelines on how to choose an index, so I will explain accordingly.
77
+ https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index
78
+
79
+ For datasets below 1M, 4bit-PQ is the most efficient method available in faiss as of April 2023.
80
+ Combining this with IVF, narrowing down the candidates with 4bit-PQ, and finally recalculating the distance with an accurate index can be described by using the following index factory.
81
+
82
+ ```python
83
+ index = faiss.index_factory(256, "IVF1024,PQ128x4fs,RFlat")
84
+ ```
85
+
86
+ ## Recommended parameters for IVF
87
+ Consider the case of too many IVFs. For example, if coarse quantization by IVF is performed for the number of data, this is the same as a naive exhaustive search and is inefficient.
88
+ For 1M or less, IVF values are recommended between 4*sqrt(N) ~ 16*sqrt(N) for N number of data points.
89
+
90
+ Since the calculation time increases in proportion to the number of n_probes, please consult with the accuracy and choose appropriately. Personally, I don't think RVC needs that much accuracy, so n_probe = 1 is fine.
91
+
92
+ ## FastScan
93
+ FastScan is a method that enables high-speed approximation of distances by Cartesian product quantization by performing them in registers.
94
+ Cartesian product quantization performs clustering independently for each d dimension (usually d = 2) during learning, calculates the distance between clusters in advance, and creates a lookup table. At the time of prediction, the distance of each dimension can be calculated in O(1) by looking at the lookup table.
95
+ So the number you specify after PQ usually specifies half the dimension of the vector.
96
+
97
+ For a more detailed description of FastScan, please refer to the official documentation.
98
+ https://github.com/facebookresearch/faiss/wiki/Fast-accumulation-of-PQ-and-AQ-codes-(FastScan)
99
+
100
+ ## RFlat
101
+ RFlat is an instruction to recalculate the rough distance calculated by FastScan with the exact distance specified by the third argument of index factory.
102
+ When getting k neighbors, k*k_factor points are recalculated.
docs/en/faq_en.md ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Q1:ffmpeg error/utf8 error.
2
+ It is most likely not a FFmpeg issue, but rather an audio path issue;
3
+
4
+ FFmpeg may encounter an error when reading paths containing special characters like spaces and (), which may cause an FFmpeg error; and when the training set's audio contains Chinese paths, writing it into filelist.txt may cause a utf8 error.<br>
5
+
6
+ ## Q2:Cannot find index file after "One-click Training".
7
+ If it displays "Training is done. The program is closed," then the model has been trained successfully, and the subsequent errors are fake;
8
+
9
+ The lack of an 'added' index file after One-click training may be due to the training set being too large, causing the addition of the index to get stuck; this has been resolved by using batch processing to add the index, which solves the problem of memory overload when adding the index. As a temporary solution, try clicking the "Train Index" button again.<br>
10
+
11
+ ## Q3:Cannot find the model in “Inferencing timbre” after training
12
+ Click “Refresh timbre list” and check again; if still not visible, check if there are any errors during training and send screenshots of the console, web UI, and logs/experiment_name/*.log to the developers for further analysis.<br>
13
+
14
+ ## Q4:How to share a model/How to use others' models?
15
+ The pth files stored in rvc_root/logs/experiment_name are not meant for sharing or inference, but for storing the experiment checkpoits for reproducibility and further training. The model to be shared should be the 60+MB pth file in the weights folder;
16
+
17
+ In the future, weights/exp_name.pth and logs/exp_name/added_xxx.index will be merged into a single weights/exp_name.zip file to eliminate the need for manual index input; so share the zip file, not the pth file, unless you want to continue training on a different machine;
18
+
19
+ Copying/sharing the several hundred MB pth files from the logs folder to the weights folder for forced inference may result in errors such as missing f0, tgt_sr, or other keys. You need to use the ckpt tab at the bottom to manually or automatically (if the information is found in the logs/exp_name), select whether to include pitch infomation and target audio sampling rate options and then extract the smaller model. After extraction, there will be a 60+ MB pth file in the weights folder, and you can refresh the voices to use it.<br>
20
+
21
+ ## Q5:Connection Error.
22
+ You may have closed the console (black command line window).<br>
23
+
24
+ ## Q6:WebUI popup 'Expecting value: line 1 column 1 (char 0)'.
25
+ Please disable system LAN proxy/global proxy and then refresh.<br>
26
+
27
+ ## Q7:How to train and infer without the WebUI?
28
+ Training script:<br>
29
+ You can run training in WebUI first, and the command-line versions of dataset preprocessing and training will be displayed in the message window.<br>
30
+
31
+ Inference script:<br>
32
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/myinfer.py<br>
33
+
34
+
35
+ e.g.<br>
36
+
37
+ runtime\python.exe myinfer.py 0 "E:\codes\py39\RVC-beta\todo-songs\1111.wav" "E:\codes\py39\logs\mi-test\added_IVF677_Flat_nprobe_7.index" harvest "test.wav" "weights/mi-test.pth" 0.6 cuda:0 True<br>
38
+
39
+
40
+ f0up_key=sys.argv[1]<br>
41
+ input_path=sys.argv[2]<br>
42
+ index_path=sys.argv[3]<br>
43
+ f0method=sys.argv[4]#harvest or pm<br>
44
+ opt_path=sys.argv[5]<br>
45
+ model_path=sys.argv[6]<br>
46
+ index_rate=float(sys.argv[7])<br>
47
+ device=sys.argv[8]<br>
48
+ is_half=bool(sys.argv[9])<br>
49
+
50
+ ## Q8:Cuda error/Cuda out of memory.
51
+ There is a small chance that there is a problem with the CUDA configuration or the device is not supported; more likely, there is not enough memory (out of memory).<br>
52
+
53
+ For training, reduce the batch size (if reducing to 1 is still not enough, you may need to change the graphics card); for inference, adjust the x_pad, x_query, x_center, and x_max settings in the config.py file as needed. 4G or lower memory cards (e.g. 1060(3G) and various 2G cards) can be abandoned, while 4G memory cards still have a chance.<br>
54
+
55
+ ## Q9:How many total_epoch are optimal?
56
+ If the training dataset's audio quality is poor and the noise floor is high, 20-30 epochs are sufficient. Setting it too high won't improve the audio quality of your low-quality training set.<br>
57
+
58
+ If the training set audio quality is high, the noise floor is low, and there is sufficient duration, you can increase it. 200 is acceptable (since training is fast, and if you're able to prepare a high-quality training set, your GPU likely can handle a longer training duration without issue).<br>
59
+
60
+ ## Q10:How much training set duration is needed?
61
+
62
+ A dataset of around 10min to 50min is recommended.<br>
63
+
64
+ With guaranteed high sound quality and low bottom noise, more can be added if the dataset's timbre is uniform.<br>
65
+
66
+ For a high-level training set (lean + distinctive tone), 5min to 10min is fine.<br>
67
+
68
+ There are some people who have trained successfully with 1min to 2min data, but the success is not reproducible by others and is not very informative. <br>This requires that the training set has a very distinctive timbre (e.g. a high-frequency airy anime girl sound) and the quality of the audio is high;
69
+ Data of less than 1min duration has not been successfully attempted so far. This is not recommended.<br>
70
+
71
+
72
+ ## Q11:What is the index rate for and how to adjust it?
73
+ If the tone quality of the pre-trained model and inference source is higher than that of the training set, they can bring up the tone quality of the inference result, but at the cost of a possible tone bias towards the tone of the underlying model/inference source rather than the tone of the training set, which is generally referred to as "tone leakage".<br>
74
+
75
+ The index rate is used to reduce/resolve the timbre leakage problem. If the index rate is set to 1, theoretically there is no timbre leakage from the inference source and the timbre quality is more biased towards the training set. If the training set has a lower sound quality than the inference source, then a higher index rate may reduce the sound quality. Turning it down to 0 does not have the effect of using retrieval blending to protect the training set tones.<br>
76
+
77
+ If the training set has good audio quality and long duration, turn up the total_epoch, when the model itself is less likely to refer to the inferred source and the pretrained underlying model, and there is little "tone leakage", the index_rate is not important and you can even not create/share the index file.<br>
78
+
79
+ ## Q12:How to choose the gpu when inferring?
80
+ In the config.py file, select the card number after "device cuda:".<br>
81
+
82
+ The mapping between card number and graphics card can be seen in the graphics card information section of the training tab.<br>
83
+
84
+ ## Q13:How to use the model saved in the middle of training?
85
+ Save via model extraction at the bottom of the ckpt processing tab.
86
+
87
+ ## Q14:File/memory error(when training)?
88
+ Too many processes and your memory is not enough. You may fix it by:
89
+
90
+ 1、decrease the input in field "Threads of CPU".
91
+
92
+ 2、pre-cut trainset to shorter audio files.
93
+
94
+ ## Q15: How to continue training using more data
95
+
96
+ step1: put all wav data to path2.
97
+
98
+ step2: exp_name2+path2 -> process dataset and extract feature.
99
+
100
+ step3: copy the latest G and D file of exp_name1 (your previous experiment) into exp_name2 folder.
101
+
102
+ step4: click "train the model", and it will continue training from the beginning of your previous exp model epoch.
103
+
104
+ ## Q16: error about llvmlite.dll
105
+
106
+ OSError: Could not load shared object file: llvmlite.dll
107
+
108
+ FileNotFoundError: Could not find module lib\site-packages\llvmlite\binding\llvmlite.dll (or one of its dependencies). Try using the full path with constructor syntax.
109
+
110
+ The issue will happen in windows, install https://aka.ms/vs/17/release/vc_redist.x64.exe and it will be fixed.
111
+
112
+ ## Q17: RuntimeError: The expanded size of the tensor (17280) must match the existing size (0) at non-singleton dimension 1. Target sizes: [1, 17280]. Tensor sizes: [0]
113
+
114
+ Delete the wav files whose size is significantly smaller than others, and that won't happen again. Than click "train the model"and "train the index".
115
+
116
+ ## Q18: RuntimeError: The size of tensor a (24) must match the size of tensor b (16) at non-singleton dimension 2
117
+
118
+ Do not change the sampling rate and then continue training. If it is necessary to change, the exp name should be changed and the model will be trained from scratch. You can also copy the pitch and features (0/1/2/2b folders) extracted last time to accelerate the training process.
119
+
docs/en/training_tips_en.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Instructions and tips for RVC training
2
+ ======================================
3
+ This TIPS explains how data training is done.
4
+
5
+ # Training flow
6
+ I will explain along the steps in the training tab of the GUI.
7
+
8
+ ## step1
9
+ Set the experiment name here.
10
+
11
+ You can also set here whether the model should take pitch into account.
12
+ If the model doesn't consider pitch, the model will be lighter, but not suitable for singing.
13
+
14
+ Data for each experiment is placed in `/logs/your-experiment-name/`.
15
+
16
+ ## step2a
17
+ Loads and preprocesses audio.
18
+
19
+ ### load audio
20
+ If you specify a folder with audio, the audio files in that folder will be read automatically.
21
+ For example, if you specify `C:Users\hoge\voices`, `C:Users\hoge\voices\voice.mp3` will be loaded, but `C:Users\hoge\voices\dir\voice.mp3` will Not loaded.
22
+
23
+ Since ffmpeg is used internally for reading audio, if the extension is supported by ffmpeg, it will be read automatically.
24
+ After converting to int16 with ffmpeg, convert to float32 and normalize between -1 to 1.
25
+
26
+ ### denoising
27
+ The audio is smoothed by scipy's filtfilt.
28
+
29
+ ### Audio Split
30
+ First, the input audio is divided by detecting parts of silence that last longer than a certain period (max_sil_kept=5 seconds?). After splitting the audio on silence, split the audio every 4 seconds with an overlap of 0.3 seconds. For audio separated within 4 seconds, after normalizing the volume, convert the wav file to `/logs/your-experiment-name/0_gt_wavs` and then convert it to 16k sampling rate to `/logs/your-experiment-name/1_16k_wavs ` as a wav file.
31
+
32
+ ## step2b
33
+ ### Extract pitch
34
+ Extract pitch information from wav files. Extract the pitch information (=f0) using the method built into parselmouth or pyworld and save it in `/logs/your-experiment-name/2a_f0`. Then logarithmically convert the pitch information to an integer between 1 and 255 and save it in `/logs/your-experiment-name/2b-f0nsf`.
35
+
36
+ ### Extract feature_print
37
+ Convert the wav file to embedding in advance using HuBERT. Read the wav file saved in `/logs/your-experiment-name/1_16k_wavs`, convert the wav file to 256-dimensional features with HuBERT, and save in npy format in `/logs/your-experiment-name/3_feature256`.
38
+
39
+ ## step3
40
+ train the model.
41
+ ### Glossary for Beginners
42
+ In deep learning, the data set is divided and the learning proceeds little by little. In one model update (step), batch_size data are retrieved and predictions and error corrections are performed. Doing this once for a dataset counts as one epoch.
43
+
44
+ Therefore, the learning time is the learning time per step x (the number of data in the dataset / batch size) x the number of epochs. In general, the larger the batch size, the more stable the learning becomes (learning time per step ÷ batch size) becomes smaller, but it uses more GPU memory. GPU RAM can be checked with the nvidia-smi command. Learning can be done in a short time by increasing the batch size as much as possible according to the machine of the execution environment.
45
+
46
+ ### Specify pretrained model
47
+ RVC starts training the model from pretrained weights instead of from 0, so it can be trained with a small dataset.
48
+
49
+ By default
50
+
51
+ - If you consider pitch, it loads `rvc-location/pretrained/f0G40k.pth` and `rvc-location/pretrained/f0D40k.pth`.
52
+ - If you don't consider pitch, it loads `rvc-location/pretrained/f0G40k.pth` and `rvc-location/pretrained/f0D40k.pth`.
53
+
54
+ When learning, model parameters are saved in `logs/your-experiment-name/G_{}.pth` and `logs/your-experiment-name/D_{}.pth` for each save_every_epoch, but by specifying this path, you can start learning. You can restart or start training from model weights learned in a different experiment.
55
+
56
+ ### learning index
57
+ RVC saves the HuBERT feature values used during training, and during inference, searches for feature values that are similar to the feature values used during learning to perform inference. In order to perform this search at high speed, the index is learned in advance.
58
+ For index learning, we use the approximate neighborhood search library faiss. Read the feature value of `logs/your-experiment-name/3_feature256` and use it to learn the index, and save it as `logs/your-experiment-name/add_XXX.index`.
59
+
60
+ (From the 20230428update version, it is read from the index, and saving / specifying is no longer necessary.)
61
+
62
+ ### Button description
63
+ - Train model: After executing step2b, press this button to train the model.
64
+ - Train feature index: After training the model, perform index learning.
65
+ - One-click training: step2b, model training and feature index training all at once.
docs/fr/Changelog_FR.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 2023-08-13
2
+ 1-Corrections régulières de bugs
3
+ - Modification du nombre total d'époques minimum à 1 et changement du nombre total d'époques minimum à 2
4
+ - Correction des erreurs d'entraînement sans utiliser de modèles pré-entraînés
5
+ - Après la séparation des voix d'accompagnement, libération de la mémoire graphique
6
+ - Changement du chemin absolu d'enregistrement de faiss en chemin relatif
7
+ - Prise en charge des chemins contenant des espaces (le chemin du jeu de données d'entraînement et le nom de l'expérience sont pris en charge, et aucune erreur ne sera signalée)
8
+ - La liste de fichiers annule l'encodage utf8 obligatoire
9
+ - Résolution du problème de consommation de CPU causé par la recherche faiss lors des changements de voix en temps réel
10
+
11
+ 2-Mises à jour clés
12
+ - Entraînement du modèle d'extraction de hauteur vocale open-source le plus puissant actuel, RMVPE, et utilisation pour l'entraînement, l'inférence hors ligne/en temps réel de RVC, supportant PyTorch/Onnx/DirectML
13
+ - Prise en charge des cartes graphiques AMD et Intel via Pytorch_DML
14
+
15
+ (1) Changement de voix en temps réel (2) Inférence (3) Séparation de l'accompagnement vocal (4) L'entraînement n'est pas actuellement pris en charge, passera à l'entraînement CPU; prend en charge l'inférence RMVPE de la GPU par Onnx_Dml
16
+
17
+ ### 2023-06-18
18
+ - Nouveaux modèles pré-entraînés v2 : 32k et 48k
19
+ - Correction des erreurs d'inférence du modèle non-f0
20
+ - Pour un jeu de données d'entraînement dépassant 1 heure, réalisation automatique de minibatch-kmeans pour réduire la forme des caractéristiques, afin que l'entraînement, l'ajout et la recherche d'index soient beaucoup plus rapides.
21
+ - Fourniture d'un espace huggingface vocal2guitar jouet
22
+ - Suppression automatique des audios de jeu de données d'entraînement court-circuitant les valeurs aberrantes
23
+ - Onglet d'exportation Onnx
24
+
25
+ Expériences échouées:
26
+ - ~~Récupération de caractéristiques : ajout de la récupération de caractéristiques temporelles : non efficace~~
27
+ - ~~Récupération de caractéristiques : ajout de la réduction de dimensionnalité PCAR : la recherche est encore plus lente~~
28
+ - ~~Augmentation aléatoire des données lors de l'entraînement : non efficace~~
29
+
30
+ Liste de tâches:
31
+ - ~~Vocos-RVC (vocodeur minuscule) : non efficace~~
32
+ - ~~Support de Crepe pour l'entraînement : remplacé par RMVPE~~
33
+ - ~~Inférence de précision à moitié crepe : remplacée par RMVPE. Et difficile à réaliser.~~
34
+ - Support de l'éditeur F0
35
+
36
+ ### 2023-05-28
37
+ - Ajout d'un cahier v2, changelog coréen, correction de certaines exigences environnementales
38
+ - Ajout d'un mode de protection des consonnes muettes et de la respiration
39
+ - Support de la détection de hauteur crepe-full
40
+ - Séparation vocale UVR5 : support des modèles de déréverbération et de désécho
41
+ - Ajout du nom de l'expérience et de la version sur le nom de l'index
42
+ - Support pour les utilisateurs de sélectionner manuellement le format d'exportation des audios de sortie lors du traitement de conversion vocale en lots et de la séparation vocale UVR5
43
+ - L'entraînement du modèle v1 32k n'est plus pris en charge
44
+
45
+ ### 2023-05-13
46
+ - Nettoyage des codes redondants de l'ancienne version du runtime dans le package en un clic : lib.infer_pack et uvr5_pack
47
+ - Correction du bug de multiprocessus pseudo dans la préparation du jeu de données d'entraînement
48
+ - Ajout de l'ajustement du rayon de filtrage médian pour l'algorithme de reconnaissance de hauteur de récolte
49
+ - Prise en charge du rééchantillonnage post-traitement pour l'exportation audio
50
+ - Réglage de multi-traitement "n_cpu" pour l'entraînement est passé de "extraction f0" à "prétraitement des données et extraction f0"
51
+ - Détection automatique des chemins d'index sous le dossier de logs et fourniture d'une fonction de liste déroulante
52
+ - Ajout de "Questions fréquemment posées et réponses" sur la page d'onglet (vous pouvez également consulter le wiki github RVC)
53
+ - Lors de l'inférence, la hauteur de la récolte est mise en cache lors de l'utilisation du même chemin d'accès audio d'entrée (objectif : en utilisant l'extraction de
54
+
55
+ la hauteur de la récolte, l'ensemble du pipeline passera par un long processus d'extraction de la hauteur répétitif. Si la mise en cache n'est pas utilisée, les utilisateurs qui expérimentent différents timbres, index, et réglages de rayon de filtrage médian de hauteur connaîtront un processus d'attente très douloureux après la première inférence)
56
+
57
+ ### 2023-05-14
58
+ - Utilisation de l'enveloppe de volume de l'entrée pour mixer ou remplacer l'enveloppe de volume de la sortie (peut atténuer le problème du "muet en entrée et bruit de faible amplitude en sortie". Si le bruit de fond de l'audio d'entrée est élevé, il n'est pas recommandé de l'activer, et il n'est pas activé par défaut (1 peut être considéré comme n'étant pas activé)
59
+ - Prise en charge de la sauvegarde des modèles extraits à une fréquence spécifiée (si vous voulez voir les performances sous différentes époques, mais que vous ne voulez pas sauvegarder tous les grands points de contrôle et extraire manuellement les petits modèles par ckpt-processing à chaque fois, cette fonctionnalité sera très pratique)
60
+ - Résolution du problème des "erreurs de connexion" causées par le proxy global du serveur en définissant des variables d'environnement
61
+ - Prise en charge des modèles pré-entraînés v2 (actuellement, seule la version 40k est disponible au public pour les tests, et les deux autres taux d'échantillonnage n'ont pas encore été entièrement entraînés)
62
+ - Limite le volume excessif dépassant 1 avant l'inférence
63
+ - Réglages légèrement ajustés de la préparation du jeu de données d'entraînement
64
+
65
+ #######################
66
+
67
+ Historique des changelogs:
68
+
69
+ ### 2023-04-09
70
+ - Correction des paramètres d'entraînement pour améliorer le taux d'utilisation du GPU : A100 est passé de 25% à environ 90%, V100 : de 50% à environ 90%, 2060S : de 60% à environ 85%, P40 : de 25% à environ 95% ; amélioration significative de la vitesse d'entraînement
71
+ - Changement de paramètre : la taille de batch_size totale est maintenant la taille de batch_size par GPU
72
+ - Changement de total_epoch : la limite maximale est passée de 100 à 1000 ; la valeur par défaut est passée de 10 à 20
73
+ - Correction du problème d'extraction de ckpt reconnaissant la hauteur de manière incorrecte, causant une inférence anormale
74
+ - Correction du problème d'entraînement distribué sauvegardant ckpt pour chaque rang
75
+ - Application du filtrage des caractéristiques nan pour l'extraction des caractéristiques
76
+ - Correction du problème d'entrée/sortie silencieuse produisant des consonnes aléatoires ou du bruit (les anciens modèles doivent être réentraînés avec un nouveau jeu de données)
77
+
78
+ ### 2023-04-16 Mise à jour
79
+ - Ajout d'une mini-interface graphique pour le changement de voix en temps réel, démarrage par double-clic sur go-realtime-gui.bat
80
+ - Application d'un filtrage pour les bandes de fréquences inférieures à 50Hz pendant l'entraînement et l'inférence
81
+ - Abaissement de l'extraction de hauteur minimale de pyworld du défaut 80 à 50 pour l'entraînement et l'inférence, permettant aux voix masculines graves entre 50-80Hz de ne pas être mises en sourdine
82
+ - WebUI prend en charge le changement de langue en fonction des paramètres régionaux du système (prise en charge actuelle de en_US, ja_JP, zh_CN, zh_HK, zh_SG, zh_TW ; défaut à en_US si non pris en charge)
83
+ - Correction de la reconnaissance de certains GPU (par exemple, échec de reconnaissance V100-16G, échec de reconnaissance P4)
84
+
85
+ ### 2023-04-28 Mise à jour
86
+ - Mise à niveau des paramètres d'index de faiss pour une vitesse plus rapide et une meilleure qualité
87
+ - Suppression de la dépendance à total_npy ; le partage futur de modèles ne nécessitera pas d'entrée total
88
+
89
+ _npy
90
+ - Levée des restrictions pour les GPU de la série 16, fournissant des paramètres d'inférence de 4 Go pour les GPU VRAM de 4 Go
91
+ - Correction d'un bug dans la séparation vocale d'accompagnement UVR5 pour certains formats audio
92
+ - La mini-interface de changement de voix en temps réel prend maintenant en charge les modèles de hauteur non-40k et non-lazy
93
+
94
+ ### Plans futurs :
95
+ Fonctionnalités :
96
+ - Ajouter une option : extraire de petits modèles pour chaque sauvegarde d'époque
97
+ - Ajouter une option : exporter un mp3 supplémentaire vers le chemin spécifié pendant l'inférence
98
+ - Prise en charge de l'onglet d'entraînement multi-personnes (jusqu'à 4 personnes)
99
+
100
+ Modèle de base :
101
+ - Collecter des fichiers wav de respiration pour les ajouter au jeu de données d'entraînement pour résoudre le problème des sons de respiration déformés
102
+ - Nous entraînons actuellement un modèle de base avec un jeu de données de chant étendu, qui sera publié à l'avenir
docs/fr/README.fr.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <h1>Retrieval-based-Voice-Conversion-WebUI</h1>
4
+ Un framework simple et facile à utiliser pour la conversion vocale (modificateur de voix) basé sur VITS<br><br>
5
+
6
+ [![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
7
+ )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
8
+
9
+ <img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
10
+
11
+ [![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
12
+ [![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)
13
+ [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
14
+
15
+ [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
16
+
17
+ [**Journal de mise à jour**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/Changelog_CN.md) | [**FAQ**](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·Formation d'un chanteur AI pour 5 centimes**](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) | [**Enregistrement des expériences comparatives**](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)) | [**Démonstration en ligne**](https://huggingface.co/spaces/Ricecake123/RVC-demo)
18
+
19
+ </div>
20
+
21
+ ------
22
+
23
+ [**English**](./docs/en/README.en.md) |[ **中文简体**](./docs/cn/README.md) | [**日本語**](./docs/jp/README.ja.md) | [**한국어**](./docs/kr/README.ko.md) ([**韓國語**](./docs/kr/README.ko.han.md)) | [**Turc**](./docs/tr/README.tr.md)
24
+
25
+ Cliquez ici pour voir notre [vidéo de démonstration](https://www.bilibili.com/video/BV1pm4y1z7Gm/) !
26
+
27
+ > Conversion vocale en temps réel avec RVC : [w-okada/voice-changer](https://github.com/w-okada/voice-changer)
28
+
29
+ > Le modèle de base est formé avec près de 50 heures de données VCTK de haute qualité et open source. Aucun souci concernant les droits d'auteur, n'hésitez pas à l'utiliser.
30
+
31
+ > Attendez-vous au modèle de base RVCv3 : plus de paramètres, plus de données, de meilleurs résultats, une vitesse d'inférence presque identique, et nécessite moins de données pour la formation.
32
+
33
+ ## Introduction
34
+ Ce dépôt a les caractéristiques suivantes :
35
+ + Utilise le top1 pour remplacer les caractéristiques de la source d'entrée par les caractéristiques de l'ensemble d'entraînement pour éliminer les fuites de timbre vocal.
36
+ + Peut être formé rapidement même sur une carte graphique relativement moins performante.
37
+ + Obtient de bons résultats même avec peu de données pour la formation (il est recommandé de collecter au moins 10 minutes de données vocales avec un faible bruit de fond).
38
+ + Peut changer le timbre vocal en fusionnant des modèles (avec l'aide de l'onglet ckpt-merge).
39
+ + Interface web simple et facile à utiliser.
40
+ + Peut appeler le modèle UVR5 pour séparer rapidement la voix et l'accompagnement.
41
+ + Utilise l'algorithme de pitch vocal le plus avancé [InterSpeech2023-RMVPE](#projets-référencés) pour éliminer les problèmes de voix muette. Meilleurs résultats, plus rapide que crepe_full, et moins gourmand en ressources.
42
+ + Support d'accélération pour les cartes A et I.
43
+
44
+ ## Configuration de l'environnement
45
+ Exécutez les commandes suivantes dans un environnement Python de version supérieure à 3.8.
46
+
47
+ (Windows/Linux)
48
+ Installez d'abord les dépendances principales via pip :
49
+ ```bash
50
+ # Installez Pytorch et ses dépendances essentielles, sautez si déjà installé.
51
+ # Voir : https://pytorch.org/get-started/locally/
52
+ pip install torch torchvision torchaudio
53
+
54
+ # Pour les utilisateurs de Windows avec une architecture Nvidia Ampere (RTX30xx), en se basant sur l'expérience #21, spécifiez la version CUDA correspondante pour Pytorch.
55
+ # pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
56
+ ```
57
+
58
+ Vous pouvez utiliser poetry pour installer les dépendances :
59
+ ```bash
60
+ # Installez l'outil de gestion des dépendances Poetry, sautez si déjà installé.
61
+ # Voir : https://python-poetry.org/docs/#installation
62
+ curl -sSL https://install.python-poetry.org | python3 -
63
+
64
+ # Installez les dépendances avec poetry.
65
+ poetry install
66
+ ```
67
+
68
+ Ou vous pouvez utiliser pip pour installer les dépendances :
69
+ ```bash
70
+ Cartes Nvidia :
71
+
72
+ pip install -r requirements.txt
73
+
74
+ Cartes AMD/Intel :
75
+ pip install -
76
+
77
+ r requirements-dml.txt
78
+
79
+ ```
80
+
81
+ ------
82
+ Les utilisateurs de Mac peuvent exécuter `run.sh` pour installer les dépendances :
83
+ ```bash
84
+ sh ./run.sh
85
+ ```
86
+
87
+ ## Préparation d'autres modèles pré-entraînés
88
+ RVC nécessite d'autres modèles pré-entraînés pour l'inférence et la formation.
89
+
90
+ Vous pouvez télécharger ces modèles depuis notre [espace Hugging Face](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/).
91
+
92
+ Voici une liste des modèles et autres fichiers requis par RVC :
93
+ ```bash
94
+ ./assets/hubert/hubert_base.pt
95
+
96
+ ./assets/pretrained
97
+
98
+ ./assets/uvr5_weights
99
+
100
+ Pour tester la version v2 du modèle, téléchargez également :
101
+
102
+ ./assets/pretrained_v2
103
+
104
+ Si vous utilisez Windows, vous pourriez avoir besoin de ces fichiers pour ffmpeg et ffprobe, sautez cette étape si vous avez déjà installé ffmpeg et ffprobe. Les utilisateurs d'ubuntu/debian peuvent installer ces deux bibliothèques avec apt install ffmpeg. Les utilisateurs de Mac peuvent les installer avec brew install ffmpeg (prérequis : avoir installé brew).
105
+
106
+ ./ffmpeg
107
+
108
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe
109
+
110
+ ./ffprobe
111
+
112
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe
113
+
114
+ Si vous souhaitez utiliser le dernier algorithme RMVPE de pitch vocal, téléchargez les paramètres du modèle de pitch et placez-les dans le répertoire racine de RVC.
115
+
116
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.pt
117
+
118
+ Les utilisateurs de cartes AMD/Intel nécessitant l'environnement DML doivent télécharger :
119
+
120
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.onnx
121
+
122
+ ```
123
+ Ensuite, exécutez la commande suivante pour démarrer WebUI :
124
+ ```bash
125
+ python infer-web.py
126
+ ```
127
+
128
+ Si vous utilisez Windows ou macOS, vous pouvez télécharger et extraire `RVC-beta.7z`. Les utilisateurs de Windows peuvent exécuter `go-web.bat` pour démarrer WebUI, tandis que les utilisateurs de macOS peuvent exécuter `sh ./run.sh`.
129
+
130
+ Il y a également un `Guide facile pour les débutants.doc` inclus pour référence.
131
+
132
+ ## Crédits
133
+ + [ContentVec](https://github.com/auspicious3000/contentvec/)
134
+ + [VITS](https://github.com/jaywalnut310/vits)
135
+ + [HIFIGAN](https://github.com/jik876/hifi-gan)
136
+ + [Gradio](https://github.com/gradio-app/gradio)
137
+ + [FFmpeg](https://github.com/FFmpeg/FFmpeg)
138
+ + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
139
+ + [audio-slicer](https://github.com/openvpi/audio-slicer)
140
+ + [Extraction de la hauteur vocale : RMVPE](https://github.com/Dream-High/RMVPE)
141
+ + Le modèle pré-entraîné a été formé et testé par [yxlllc](https://github.com/yxlllc/RMVPE) et [RVC-Boss](https://github.com/RVC-Boss).
142
+
143
+ ## Remerciements à tous les contributeurs pour leurs efforts
144
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
145
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
146
+ </a>
docs/fr/faiss_tips_fr.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Conseils de réglage pour faiss
2
+ ==================
3
+ # À propos de faiss
4
+ faiss est une bibliothèque de recherches de voisins pour les vecteurs denses, développée par Facebook Research, qui implémente efficacement de nombreuses méthodes de recherche de voisins approximatifs.
5
+ La recherche de voisins approximatifs trouve rapidement des vecteurs similaires tout en sacrifiant une certaine précision.
6
+
7
+ ## faiss dans RVC
8
+ Dans RVC, pour l'incorporation des caractéristiques converties par HuBERT, nous recherchons des incorporations similaires à l'incorporation générée à partir des données d'entraînement et les mixons pour obtenir une conversion plus proche de la parole originale. Cependant, cette recherche serait longue si elle était effectuée de manière naïve, donc une conversion à haute vitesse est réalisée en utilisant une recherche de voisinage approximatif.
9
+
10
+ # Vue d'ensemble de la mise en œuvre
11
+ Dans '/logs/votre-expérience/3_feature256' où le modèle est situé, les caractéristiques extraites par HuBERT de chaque donnée vocale sont situées.
12
+ À partir de là, nous lisons les fichiers npy dans un ordre trié par nom de fichier et concaténons les vecteurs pour créer big_npy. (Ce vecteur a la forme [N, 256].)
13
+ Après avoir sauvegardé big_npy comme /logs/votre-expérience/total_fea.npy, nous l'entraînons avec faiss.
14
+
15
+ Dans cet article, j'expliquerai la signification de ces paramètres.
16
+
17
+ # Explication de la méthode
18
+ ## Usine d'index
19
+ Une usine d'index est une notation unique de faiss qui exprime un pipeline qui relie plusieurs méthodes de recherche de voisinage approximatif sous forme de chaîne.
20
+ Cela vous permet d'essayer diverses méthodes de recherche de voisinage approximatif simplement en changeant la chaîne de l'usine d'index.
21
+ Dans RVC, elle est utilisée comme ceci :
22
+
23
+ ```python
24
+ index = faiss.index_factory(256, "IVF%s,Flat" % n_ivf)
25
+ ```
26
+
27
+ Parmi les arguments de index_factory, le premier est le nombre de dimensions du vecteur, le second est la chaîne de l'usine d'index, et le troisième est la distance à utiliser.
28
+
29
+ Pour une notation plus détaillée :
30
+ https://github.com/facebookresearch/faiss/wiki/The-index-factory
31
+
32
+ ## Index pour la distance
33
+ Il existe deux index typiques utilisés comme similarité de l'incorporation comme suit :
34
+
35
+ - Distance euclidienne (METRIC_L2)
36
+ - Produit intérieur (METRIC_INNER_PRODUCT)
37
+
38
+ La distance euclidienne prend la différence au carré dans chaque dimension, somme les différences dans toutes les dimensions, puis prend la racine carrée. C'est la même chose que la distance en 2D et 3D que nous utilisons au quotidien.
39
+ Le produit intérieur n'est pas utilisé comme index de similarité tel quel, et la similarité cosinus qui prend le produit intérieur après avoir été normalisé par la norme L2 est généralement utilisée.
40
+
41
+ Lequel est le mieux dépend du cas, mais la similarité cosinus est souvent utilisée dans l'incorporation obtenue par word2vec et des modèles de récupération d'images similaires appris par ArcFace. Si vous voulez faire une normalisation l2 sur le vecteur X avec numpy, vous pouvez le faire avec le code suivant avec eps suffisamment petit pour éviter une division par 0.
42
+
43
+ ```python
44
+ X_normed = X / np.maximum(eps, np.linalg.norm(X, ord=2, axis=-1, keepdims=True))
45
+ ```
46
+
47
+ De plus, pour l'usine d'index, vous pouvez changer l'index de distance utilisé pour le calcul en choisissant la valeur à passer comme troisième argument.
48
+
49
+ ```python
50
+ index = faiss.index_factory(dimention, texte, faiss.METRIC_INNER_PRODUCT)
51
+ ```
52
+
53
+ ## IVF
54
+ IVF (Inverted file indexes) est un algorithme similaire à l'index inversé dans la recherche en texte intégral.
55
+ Lors de l'apprentissage, la cible de recherche est regroupée avec kmeans, et une partition de Voronoi est effectuée en utilisant le centre du cluster. Chaque point de données est attribué à un cluster, nous créons donc un dictionnaire qui permet de rechercher les points de données à partir des clusters.
56
+
57
+ Par exemple, si des clusters sont attribués comme suit :
58
+ |index|Cluster|
59
+ |-----|-------|
60
+ |1|A|
61
+ |2|B|
62
+ |3|A|
63
+ |4|C|
64
+ |5|B|
65
+
66
+ L'index inversé résultant ressemble à ceci :
67
+
68
+ |cluster|index|
69
+ |-------|-----|
70
+ |A|1, 3|
71
+ |B|2, 5|
72
+ |C|4|
73
+
74
+ Lors de la recherche, nous recherchons d'abord n_probe clusters parmi les clusters, puis nous calculons les distances pour les points de données appartenant à chaque cluster.
75
+
76
+ # Recommandation de paramètre
77
+ Il existe des directives officielles sur la façon de choisir un index, je vais donc expliquer en conséquence.
78
+ https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index
79
+
80
+ Pour les ensembles de données inférieurs à 1M, 4bit-PQ est la méthode la plus efficace disponible dans faiss en avril 2023.
81
+ En combinant cela avec IVF, en réduisant les candidats avec 4bit-PQ, et enfin en recalculant la distance avec un index précis, on peut le décrire en utilisant l'usine d'index suivante.
82
+
83
+ ```python
84
+ index = faiss.index_factory(256, "IVF1024,PQ128x4fs,RFlat")
85
+ ```
86
+
87
+ ## Paramètres recommandés pour IVF
88
+ Considérez le cas de trop d'IVF. Par exemple, si une quantification grossière par IVF est effectuée pour le nombre de données, cela revient à une recherche exhaustive naïve et est inefficace.
89
+ Pour 1M ou moins, les valeurs IVF sont recommandées entre 4*sqrt(N) ~ 16*sqrt(N) pour N nombre de points de données.
90
+
91
+ Comme le temps de calcul augmente proportionnellement au nombre de n_probes, veuillez consulter la précision et choisir de manière appropriée. Personnellement, je ne pense pas que RVC ait besoin de tant de précision, donc n_probe = 1 est bien.
92
+
93
+ ## FastScan
94
+ FastScan est une méthode qui permet d'approximer rapidement les distances par quantification de produit cartésien en les effectuant dans les registres.
95
+ La quantification du produit cartésien effectue un regroupement indépendamment
96
+
97
+ pour chaque dimension d (généralement d = 2) pendant l'apprentissage, calcule la distance entre les clusters à l'avance, et crée une table de recherche. Au moment de la prédiction, la distance de chaque dimension peut être calculée en O(1) en consultant la table de recherche.
98
+ Le nombre que vous spécifiez après PQ spécifie généralement la moitié de la dimension du vecteur.
99
+
100
+ Pour une description plus détaillée de FastScan, veuillez consulter la documentation officielle.
101
+ https://github.com/facebookresearch/faiss/wiki/Fast-accumulation-of-PQ-and-AQ-codes-(FastScan)
102
+
103
+ ## RFlat
104
+ RFlat est une instruction pour recalculer la distance approximative calculée par FastScan avec la distance exacte spécifiée par le troisième argument de l'usine d'index.
105
+ Lors de l'obtention de k voisins, k*k_factor points sont recalculés.
docs/fr/faq_fr.md ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Q1: Erreur ffmpeg/erreur utf8.
2
+ Il s'agit très probablement non pas d'un problème lié à FFmpeg, mais d'un problème lié au chemin de l'audio ;
3
+
4
+ FFmpeg peut rencontrer une erreur lors de la lecture de chemins contenant des caractères spéciaux tels que des espaces et (), ce qui peut provoquer une erreur FFmpeg ; et lorsque l'audio du jeu d'entraînement contient des chemins en chinois, l'écrire dans filelist.txt peut provoquer une erreur utf8.<br>
5
+
6
+ ## Q2: Impossible de trouver le fichier index après "Entraînement en un clic".
7
+ Si l'affichage indique "L'entraînement est terminé. Le programme est fermé", alors le modèle a été formé avec succès, et les erreurs subséquentes sont fausses ;
8
+
9
+ L'absence d'un fichier index 'ajouté' après un entraînement en un clic peut être due au fait que le jeu d'entraînement est trop grand, ce qui bloque l'ajout de l'index ; cela a été résolu en utilisant un traitement par lots pour ajouter l'index, ce qui résout le problème de surcharge de mémoire lors de l'ajout de l'index. Comme solution temporaire, essayez de cliquer à nouveau sur le bouton "Entraîner l'index".<br>
10
+
11
+ ## Q3: Impossible de trouver le modèle dans “Inférence du timbre” après l'entraînement
12
+ Cliquez sur “Actualiser la liste des timbres” et vérifiez à nouveau ; si vous ne le voyez toujours pas, vérifiez s'il y a des erreurs pendant l'entraînement et envoyez des captures d'écran de la console, de l'interface utilisateur web, et des logs/nom_de_l'expérience/*.log aux développeurs pour une analyse plus approfondie.<br>
13
+
14
+ ## Q4: Comment partager un modèle/Comment utiliser les modèles d'autres personnes ?
15
+ Les fichiers pth stockés dans rvc_root/logs/nom_de_l'expérience ne sont pas destinés à être partagés ou inférés, mais à stocker les points de contrôle de l'expérience pour la reproductibilité et l'entraînement ultérieur. Le modèle à partager doit être le fichier pth de 60+MB dans le dossier des poids ;
16
+
17
+ À l'avenir, les poids/nom_de_l'expérience.pth et les logs/nom_de_l'expérience/ajouté_xxx.index seront fusionnés en un seul fichier poids/nom_de_l'expérience.zip pour éliminer le besoin d'une entrée d'index manuelle ; partagez donc le fichier zip, et non le fichier pth, sauf si vous souhaitez continuer l'entraînement sur une machine différente ;
18
+
19
+ Copier/partager les fichiers pth de plusieurs centaines de Mo du dossier des logs au dossier des poids pour une inférence forcée peut entraîner des erreurs telles que des f0, tgt_sr, ou d'autres clés manquantes. Vous devez utiliser l'onglet ckpt en bas pour sélectionner manuellement ou automatiquement (si l'information se trouve dans les logs/nom_de_l'expérience), si vous souhaitez inclure les informations sur la hauteur et les options de taux d'échantillonnage audio cible, puis extraire le modèle plus petit. Après extraction, il y aura un fichier pth de 60+ MB dans le dossier des poids, et vous pouvez actualiser les voix pour l'utiliser.<br>
20
+
21
+ ## Q5: Erreur de connexion.
22
+ Il se peut que vous ayez fermé la console (fenêtre de ligne de commande noire).<br>
23
+
24
+ ## Q6: WebUI affiche 'Expecting value: line 1 column 1 (char 0)'.
25
+ Veuillez désactiver le proxy système LAN/proxy global puis rafraîchir.<br>
26
+
27
+ ## Q7: Comment s'entraîner et déduire sans le WebUI ?
28
+ Script d'entraînement :<br>
29
+ Vous pouvez d'abord lancer l'entraînement dans WebUI, et les versions en ligne de commande de la préparation du jeu de données et de l'entraînement seront affichées dans la fenêtre de message.<br>
30
+
31
+ Script d'inférence :<br>
32
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/myinfer.py<br>
33
+
34
+ Par exemple :<br>
35
+
36
+ runtime\python.exe myinfer.py 0 "E:\codes\py39\RVC-beta\todo-songs\1111.wav" "E:\codes\py39\logs\mi-test\added_IVF677_Flat_nprobe_7.index" récolte "test.wav" "weights/mi-test.pth" 0.6 cuda:0 True<br>
37
+
38
+ f0up_key=sys.argv[1]<br>
39
+ input_path=sys.argv[2]<br>
40
+ index_path=sys.argv[3]<br>
41
+ f0method=sys.argv[4]#récolte ou pm<br>
42
+ opt_path=sys.argv[5]<br>
43
+ model_path=sys.argv[6]<br>
44
+ index_rate=float(sys.argv[7])<br>
45
+ device=sys.argv[8]<br>
46
+ is_half=bool(sys.argv[9])<br>
47
+
48
+ ### Explication des arguments :
49
+
50
+ 1. **Numéro de voix cible** : `0` (dans cet exemple)
51
+ 2. **Chemin du fichier audio d'entrée** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\INPUTS_VOCAL\vocal.wav"`
52
+ 3. **Chemin du fichier index** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\logs\Hagrid.index"`
53
+ 4. **Méthode pour l'extraction du pitch (F0)** : `harvest` (dans cet exemple)
54
+ 5. **Chemin de sortie pour le fichier audio traité** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\INPUTS_VOCAL\test.wav"`
55
+ 6. **Chemin du modèle** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\weights\HagridFR.pth"`
56
+ 7. **Taux d'index** : `0.6` (dans cet exemple)
57
+ 8. **Périphérique pour l'exécution (GPU/CPU)** : `cuda:0` pour une carte NVIDIA, par exemple.
58
+ 9. **Protection des droits d'auteur (True/False)**.
59
+
60
+ <!-- Pour myinfer nouveau models :
61
+
62
+ runtime\python.exe myinfer.py 0 "C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\INPUTS_VOCAL\vocal.wav" "C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\logs\Hagrid.index" harvest "C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\INPUTS_VOCAL\test.wav" "C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\weights\HagridFR.pth" 0.6 cuda:0 True 5 44100 44100 1.0 1.0 True
63
+
64
+
65
+ f0up_key=sys.argv[1]
66
+ input_path = sys.argv[2]
67
+ index_path = sys.argv[3]
68
+ f0method = sys.argv[4]
69
+ opt_path = sys.argv[5]
70
+ model_path = sys.argv[6]
71
+ index_rate = float(sys.argv[7])
72
+ device = sys.argv[8]
73
+ is_half = bool(sys.argv[9])
74
+ filter_radius = int(sys.argv[10])
75
+ tgt_sr = int(sys.argv[11])
76
+ resample_sr = int(sys.argv[12])
77
+ rms_mix_rate = float(sys.argv[13])
78
+ version = sys.argv[14]
79
+ protect = sys.argv[15].lower() == 'false' # change for true if needed
80
+
81
+ ### Explication des arguments :
82
+
83
+ 1. **Numéro de voix cible** : `0` (dans cet exemple)
84
+ 2. **Chemin du fichier audio d'entrée** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\INPUTS_VOCAL\vocal.wav"`
85
+ 3. **Chemin du fichier index** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\logs\Hagrid.index"`
86
+ 4. **Méthode pour l'extraction du pitch (F0)** : `harvest` (dans cet exemple)
87
+ 5. **Chemin de sortie pour le fichier audio traité** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\INPUTS_VOCAL\test.wav"`
88
+ 6. **Chemin du modèle** : `"C:\ YOUR PATH FOR THE ROOT (RVC0813Nvidia)\weights\HagridFR.pth"`
89
+ 7. **Taux d'index** : `0.6` (dans cet exemple)
90
+ 8. **Périphérique pour l'exécution (GPU/CPU)** : `cuda:0` pour une carte NVIDIA, par exemple.
91
+ 9. **Protection des droits d'auteur (True/False)**.
92
+ 10. **Rayon du filtre** : `5` (dans cet exemple)
93
+ 11. **Taux d'échantillonnage cible** : `44100` (dans cet exemple)
94
+ 12. **Taux d'échantillonnage pour le rééchantillonnage** : `44100` (dans cet exemple)
95
+ 13. **Taux de mixage RMS** : `1.0` (dans cet exemple)
96
+ 14. **Version** : `1.0` (dans cet exemple)
97
+ 15. **Protection** : `True` (dans cet exemple)
98
+
99
+ Assurez-vous de remplacer les chemins par ceux correspondant à votre configuration et d'ajuster les autres paramètres selon vos besoins.
100
+ -->
101
+
102
+ ## Q8: Erreur Cuda/Mémoire Cuda épuisée.
103
+ Il y a une faible chance qu'il y ait un problème avec la configuration CUDA ou que le dispositif ne soit pas pris en charge ; plus probablement, il n'y a pas assez de mémoire (manque de mémoire).<br>
104
+
105
+ Pour l'entraînement, réduisez la taille du lot (si la réduction à 1 n'est toujours pas suffisante, vous devrez peut-être changer la carte graphique) ; pour l'inférence, ajustez les paramètres x_pad, x_query, x_center, et x_max dans le fichier config.py selon les besoins. Les cartes mémoire de 4 Go ou moins (par exemple 1060(3G) et diverses cartes de 2 Go) peuvent être abandonnées, tandis que les cartes mémoire de 4 Go ont encore une chance.<br>
106
+
107
+ ## Q9: Combien de total_epoch sont optimaux ?
108
+ Si la qualité audio du jeu d'entraînement est médiocre et que le niveau de bruit est élevé, 20-30 époques sont suffisantes. Le fixer trop haut n'améliorera pas la qualité audio de votre jeu d'entraînement de faible qualité.<br>
109
+
110
+ Si la qualité audio du jeu d'entraînement est élevée, le niveau de bruit est faible, et la durée est suffisante, vous pouvez l'augmenter. 200 est acceptable (puisque l'entraînement est rapide, et si vous êtes capable de préparer un jeu d'entraînement de haute qualité, votre GPU peut probablement gérer une durée d'entraînement plus longue sans problème).<br>
111
+
112
+ ## Q10: Quelle durée de jeu d'entraînement est nécessaire ?
113
+ Un jeu d'environ 10 min à 50 min est recommandé.<br>
114
+
115
+ Avec une garantie de haute qualité sonore et de faible bruit de fond, plus peut être ajouté si le timbre du jeu est uniforme.<br>
116
+
117
+ Pour un jeu d'entraînement de haut niveau (ton maigre + ton distinctif), 5 min à 10 min sont suffisantes.<br>
118
+
119
+ Il y a des personnes qui ont réussi à s'entraîner avec des données de 1 min à 2 min, mais le succès n'est pas reproductible par d'autres et n'est pas très informatif. <br>Cela nécessite que le jeu d'entraînement ait un timbre très distinctif (par exemple, un son de fille d'anime aérien à haute fréquence) et que la qualité de l'audio soit élevée ;
120
+ Aucune tentative réussie n'a été faite jusqu'à présent avec des données de moins de 1 min. Cela n'est pas recommandé.<br>
121
+
122
+ ## Q11: À quoi sert le taux d'index et comment l'ajuster ?
123
+ Si la qualité tonale du modèle pré-entraîné et de la source d'inférence est supérieure à celle du jeu d'entraînement, ils peuvent améliorer la qualité tonale du résultat d'inférence, mais au prix d'un possible biais tonal vers le ton du modèle sous-jacent/source d'inférence plutôt que le ton du jeu d'entraînement, ce qui est généralement appelé "fuite de ton".<br>
124
+
125
+ Le taux d'index est utilisé pour réduire/résoudre le problème de la fuite de timbre. Si le taux d'index est fixé à 1, théoriquement il n'y a pas de fuite de timbre de la source d'inférence et la qualité du timbre est plus biaisée vers le jeu d'entraînement. Si le jeu d'entraînement a une qualité sonore inférieure à celle de la source d'inférence, alors un taux d'index plus élevé peut réduire la qualité sonore. Le réduire à 0 n'a pas l'effet d'utiliser le mélange de récupération pour protéger les tons du jeu d'entraînement.<br>
126
+
127
+ Si le jeu d'entraînement a une bonne qualité audio et une longue durée, augmentez le total_epoch, lorsque le modèle lui-même est moins susceptible de se référer à la source déduite et au modèle sous-jacent pré-entraîné, et qu'il y a peu de "fuite de ton", le taux d'index n'est pas important et vous pouvez même ne pas créer/partager le fichier index.<br>
128
+
129
+ ## Q12: Comment choisir le gpu lors de l'inférence ?
130
+ Dans le fichier config.py, sélectionnez le numéro de carte après "device cuda:".<br>
131
+
132
+ La correspondance entre le numéro de carte et la carte graphique peut être vue dans la section d'information de la carte graphique de l'onglet d'entraînement.<br>
133
+
134
+ ## Q13: Comment utiliser le modèle sauvegardé au milieu de l'entraînement ?
135
+ Sauvegardez via l'extraction de modèle en bas de l'onglet de traitement ckpt.
136
+
137
+ ## Q14: Erreur de fichier/erreur de mémoire (lors de l'entraînement) ?
138
+ Il y a trop de processus et votre mémoire n'est pas suffisante. Vous pouvez le corriger en :
139
+
140
+ 1. Diminuer l'entrée dans le champ "Threads of CPU".
141
+
142
+ 2. Pré-découper le jeu d'entraînement en fichiers audio plus courts.
143
+
144
+ ## Q15: Comment poursuivre l'entraînement avec plus de données
145
+
146
+ étape 1 : mettre toutes les données wav dans path2.
147
+
148
+ étape 2 : exp_name2+path2 -> traiter le jeu de données et extraire la caractéristique.
149
+
150
+ étape 3 : copier les derniers fichiers G et D de exp_name1 (votre expérience précédente) dans le dossier exp_name2.
151
+
152
+ étape 4 : cliquez sur "entraîner le modèle", et il continuera l'entraînement depuis le début de votre époque de modèle exp précédente.
153
+
154
+ ## Q16: erreur à propos de llvmlite.dll
155
+
156
+ OSError: Impossible de charger le fichier objet partagé : llvmlite.dll
157
+
158
+ FileNotFoundError: Impossible de trouver le module lib\site-packages\llvmlite\binding\llvmlite.dll (ou l'une de ses dépendances). Essayez d'utiliser la syntaxe complète du constructeur.
159
+
160
+ Le problème se produira sous Windows, installez https://aka.ms/vs/17/release/vc_redist.x64.exe et il sera corrigé.
161
+
162
+ ## Q17: RuntimeError: La taille étendue du tensor (17280) doit correspondre à la taille existante (0) à la dimension non-singleton 1. Tailles cibles : [1, 17280]. Tailles des tensors : [0]
163
+
164
+ Supprimez les fichiers wav dont la taille est nettement inférieure à celle des autres, et cela ne se reproduira plus. Ensuite, cliquez sur "entraîner le modèle" et "entraîner l'index".
165
+
166
+ ## Q18: RuntimeError: La taille du tensor a (24) doit correspondre à la taille du tensor b (16) à la dimension non-singleton 2
167
+
168
+ Ne changez pas le taux d'échantillonnage puis continuez l'entraînement. S'il est nécessaire de changer, le nom de l'expérience doit être modifié et le modèle sera formé à partir de zéro. Vous pouvez également copier les hauteurs et caractéristiques (dossiers 0/1/2/2b) extraites la dernière fois pour accélérer le processus d'entraînement.
169
+
docs/fr/training_tips_fr.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Instructions et conseils pour la formation RVC
2
+ ======================================
3
+ Ces conseils expliquent comment se déroule la formation des données.
4
+
5
+ # Flux de formation
6
+ Je vais expliquer selon les étapes de l'onglet de formation de l'interface graphique.
7
+
8
+ ## étape 1
9
+ Définissez ici le nom de l'expérience.
10
+
11
+ Vous pouvez également définir ici si le modèle doit prendre en compte le pitch.
12
+ Si le modèle ne considère pas le pitch, le modèle sera plus léger, mais pas adapté au chant.
13
+
14
+ Les données de chaque expérience sont placées dans `/logs/nom-de-votre-experience/`.
15
+
16
+ ## étape 2a
17
+ Charge et pré-traite l'audio.
18
+
19
+ ### charger l'audio
20
+ Si vous spécifiez un dossier avec de l'audio, les fichiers audio de ce dossier seront lus automatiquement.
21
+ Par exemple, si vous spécifiez `C:Users\hoge\voices`, `C:Users\hoge\voices\voice.mp3` sera chargé, mais `C:Users\hoge\voices\dir\voice.mp3` ne sera pas chargé.
22
+
23
+ Comme ffmpeg est utilisé en interne pour lire l'audio, si l'extension est prise en charge par ffmpeg, elle sera lue automatiquement.
24
+ Après la conversion en int16 avec ffmpeg, convertir en float32 et normaliser entre -1 et 1.
25
+
26
+ ### débruitage
27
+ L'audio est lissé par filtfilt de scipy.
28
+
29
+ ### Séparation audio
30
+ Tout d'abord, l'audio d'entrée est divisé en détectant des parties de silence qui durent plus d'une certaine période (max_sil_kept = 5 secondes ?). Après avoir séparé l'audio sur le silence, séparez l'audio toutes les 4 secondes avec un chevauchement de 0,3 seconde. Pour l'audio séparé en 4 secondes, après normalisation du volume, convertir le fichier wav en `/logs/nom-de-votre-experience/0_gt_wavs` puis le convertir à un taux d'échantillonnage de 16k dans `/logs/nom-de-votre-experience/1_16k_wavs` sous forme de fichier wav.
31
+
32
+ ## étape 2b
33
+ ### Extraire le pitch
34
+ Extrait les informations de pitch des fichiers wav. Extraire les informations de pitch (=f0) en utilisant la méthode intégrée dans parselmouth ou pyworld et les sauvegarder dans `/logs/nom-de-votre-experience/2a_f0`. Convertissez ensuite logarithmiquement les informations de pitch en un entier entre 1 et 255 et sauvegardez-le dans `/logs/nom-de-votre-experience/2b-f0nsf`.
35
+
36
+ ### Extraire l'empreinte de caractéristique
37
+ Convertissez le fichier wav en incorporation à l'avance en utilisant HuBERT. Lisez le fichier wav sauvegardé dans `/logs/nom-de-votre-experience/1_16k_wavs`, convertissez le fichier wav en caractéristiques de dimension 256 avec HuBERT, et sauvegardez au format npy dans `/logs/nom-de-votre-experience/3_feature256`.
38
+
39
+ ## étape 3
40
+ former le modèle.
41
+ ### Glossaire pour les débutants
42
+ Dans l'apprentissage profond, l'ensemble de données est divisé et l'apprentissage progresse petit à petit. Dans une mise à jour de modèle (étape), les données de batch_size sont récupérées et des prédictions et corrections d'erreur sont effectuées. Faire cela une fois pour un ensemble de données compte comme une époque.
43
+
44
+ Par conséquent, le temps d'apprentissage est le temps d'apprentissage par étape x (le nombre de données dans l'ensemble de données / taille du lot) x le nombre d'époques. En général, plus la taille du lot est grande, plus l'apprentissage devient stable (temps d'apprentissage par étape ÷ taille du lot) devient plus petit, mais il utilise plus de mémoire GPU. La RAM GPU peut être vérifiée avec la commande nvidia-smi. L'apprentissage peut être effectué en peu de temps en augmentant la taille du lot autant que possible selon la machine de l'environnement d'exécution.
45
+
46
+ ### Spécifier le modèle pré-entraîné
47
+ RVC commence à former le modèle à partir de poids pré-entraînés plutôt que de zéro, il peut donc être formé avec un petit ensemble de données.
48
+
49
+ Par défaut :
50
+
51
+ - Si vous considérez le pitch, il charge `rvc-location/pretrained/f0G40k.pth` et `rvc-location/pretrained/f0D40k.pth`.
52
+ - Si vous ne considérez pas le pitch, il charge `rvc-location/pretrained/f0G40k.pth` et `rvc-location/pretrained/f0D40k.pth`.
53
+
54
+ Lors de l'apprentissage, les paramètres du modèle sont sauvegardés dans `logs/nom-de-votre-experience/G_{}.pth` et `logs/nom-de-votre-experience/D_{}.pth` pour chaque save_every_epoch, mais en spécifiant ce chemin, vous pouvez démarrer l'apprentissage. Vous pouvez redémarrer ou commencer à former à partir de poids de modèle appris lors d'une expérience différente.
55
+
56
+ ### Index d'apprentissage
57
+ RVC sauvegarde les valeurs de caractéristique HuBERT utilisées lors de la formation, et pendant l'inférence, recherche les valeurs de caractéristique qui sont similaires aux valeurs de caractéristique utilisées lors de l'apprentissage pour effectuer l'inférence. Afin d'effectuer cette recherche à haute vitesse, l'index est appris à l'avance.
58
+ Pour l'apprentissage d'index, nous utilisons la bibliothèque de recherche de voisinage approximatif faiss. Lisez la valeur de caractéristique de `logs/nom-de-votre-experience/3_feature256` et utilisez-la pour apprendre l'index, et sauvegardez-la sous `logs/nom-de-votre-experience/add_XXX.index`.
59
+
60
+ (À partir de la version de mise à jour 20230428, elle est lue à partir de l'index, et la sauvegarde / spécification n'est plus nécessaire.)
61
+
62
+ ### Description du bouton
63
+ - Former le modèle : après avoir exécuté l'étape 2b, appuyez sur ce bouton pour former le modèle.
64
+ - Former l'index de caractéristique : après avoir formé le modèle, effectuez un apprentissage d'index.
65
+ - Formation en un clic : étape 2b, formation du modèle et formation de l'index de caractéristique tout d'un coup.```
docs/ilariarvcmainline.png ADDED

Git LFS Details

  • SHA256: 23f3272b1181cacfbafafeb6e749a4c2e239292c61b949d7a19513745cf50c3e
  • Pointer size: 132 Bytes
  • Size of remote file: 4.77 MB
docs/jp/README.ja.md ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <h1>Retrieval-based-Voice-Conversion-WebUI</h1>
4
+ VITSに基づく使いやすい音声変換(voice changer)framework<br><br>
5
+
6
+ [![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
7
+ )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
8
+
9
+ <img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
10
+
11
+ [![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
12
+ [![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)
13
+ [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
14
+
15
+ [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
16
+
17
+ </div>
18
+
19
+ ------
20
+
21
+ [**更新日誌**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/Changelog_CN.md)
22
+
23
+ [**English**](../en/README.en.md) | [**中文简体**](../../README.md) | [**日本語**](../jp/README.ja.md) | [**한국어**](../kr/README.ko.md) ([**韓國語**](../kr/README.ko.han.md)) | [**Türkçe**](../tr/README.tr.md)
24
+
25
+ > デモ動画は[こちら](https://www.bilibili.com/video/BV1pm4y1z7Gm/)でご覧ください。
26
+
27
+ > RVCによるリアルタイム音声変換: [w-okada/voice-changer](https://github.com/w-okada/voice-changer)
28
+
29
+ > 著作権侵害を心配することなく使用できるように、基底モデルは約50時間の高品質なオープンソースデータセットで訓練されています。
30
+
31
+ > 今後も、次々と使用許可のある高品質な歌声の資料集を追加し、基底モデルを訓練する予定です。
32
+
33
+ ## はじめに
34
+ 本リポジトリには下記の特徴があります。
35
+
36
+ + Top1検索を用いることで、生の特徴量を訓練用データセット特徴量に変換し、トーンリーケージを削減します。
37
+ + 比較的貧弱なGPUでも、高速かつ簡単に訓練できます。
38
+ + 少量のデータセットからでも、比較的良い結果を得ることができます。(10分以上のノイズの少ない音声を推奨します。)
39
+ + モデルを融合することで、音声を混ぜることができます。(ckpt processingタブの、ckpt mergeを使用します。)
40
+ + 使いやすいWebUI。
41
+ + UVR5 Modelも含んでいるため、人の声とBGMを素早く分離できます。
42
+
43
+ ## 環境構築
44
+ Poetryで依存関係をインストールすることをお勧めします。
45
+
46
+ 下記のコマンドは、Python3.8以上の環境で実行する必要があります:
47
+ ```bash
48
+ # PyTorch関連の依存関係をインストール。インストール済の場合は省略。
49
+ # 参照先: https://pytorch.org/get-started/locally/
50
+ pip install torch torchvision torchaudio
51
+
52
+ #Windows+ Nvidia Ampere Architecture(RTX30xx)の場合、 #21 に従い、pytorchに対応するcuda versionを指定する必要があります。
53
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
54
+
55
+ # PyTorch関連の依存関係をインストール。インストール済の場合は省略。
56
+ # 参照先: https://python-poetry.org/docs/#installation
57
+ curl -sSL https://install.python-poetry.org | python3 -
58
+
59
+ # Poetry経由で依存関係をインストール
60
+ poetry install
61
+ ```
62
+
63
+ pipでも依存関係のインストールが可能です:
64
+
65
+ ```bash
66
+ pip install -r requirements.txt
67
+ ```
68
+
69
+ ## 基底modelsを準備
70
+ RVCは推論/訓練のために、様々な事前訓練を行った基底モデルを必要とします。
71
+
72
+ modelsは[Hugging Face space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)からダウンロードできます。
73
+
74
+ 以下は、RVCに必要な基底モデルやその他のファイルの一覧です。
75
+ ```bash
76
+ ./assets/hubert/hubert_base.pt
77
+
78
+ ./assets/pretrained
79
+
80
+ ./assets/uvr5_weights
81
+
82
+ V2のモデルを使用するには、追加でファイルをダウンロードする必要があります
83
+
84
+ ./assets/pretrained_v2
85
+
86
+ # ffmpegがすでにinstallされている場合は省略
87
+ ./ffmpeg
88
+ ```
89
+ その後、下記のコマンドでWebUIを起動します。
90
+ ```bash
91
+ python infer-web.py
92
+ ```
93
+ Windowsをお使いの方は、直接`RVC-beta.7z`をダウンロード後に展開し、`go-web.bat`をクリックすることで、WebUIを起動することができます。(7zipが必要です。)
94
+
95
+ また、リポジトリに[小白简易教程.doc](./小白简易教程.doc)がありますので、参考にしてください(中国語版のみ)。
96
+
97
+ ## 参考プロジェクト
98
+ + [ContentVec](https://github.com/auspicious3000/contentvec/)
99
+ + [VITS](https://github.com/jaywalnut310/vits)
100
+ + [HIFIGAN](https://github.com/jik876/hifi-gan)
101
+ + [Gradio](https://github.com/gradio-app/gradio)
102
+ + [FFmpeg](https://github.com/FFmpeg/FFmpeg)
103
+ + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
104
+ + [audio-slicer](https://github.com/openvpi/audio-slicer)
105
+
106
+ ## 貢献者(contributor)の皆様の尽力に感謝します
107
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
108
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
109
+ </a>
docs/jp/faiss_tips_ja.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ faiss tuning TIPS
2
+ ==================
3
+ # about faiss
4
+ faissはfacebook researchの開発する、密なベクトルに対する近傍探索をまとめたライブラリで、多くの近似近傍探索の手法を効率的に実装しています。
5
+ 近似近傍探索はある程度精度を犠牲にしながら高速に類似するベクトルを探します。
6
+
7
+ ## faiss in RVC
8
+ RVCではHuBERTで変換した特徴量のEmbeddingに対し、学習データから生成されたEmbeddingと類似するものを検索し、混ぜることでより元の音声に近い変換を実現しています。ただ、この検索は愚直に行うと時間がかかるため、近似近傍探索を用いることで高速な変換を実現しています。
9
+
10
+ # 実装のoverview
11
+ モデルが配置されている '/logs/your-experiment/3_feature256'には各音声データからHuBERTで抽出された特徴量が配置されています。
12
+ ここからnpyファイルをファイル名でソートした順番で読み込み、ベクトルを連結してbig_npyを作成しfaissを学習させます。(このベクトルのshapeは[N, 256]です。)
13
+
14
+ 本Tipsではまずこれらのパラメータの意味を解説します。
15
+
16
+ # 手法の解説
17
+ ## index factory
18
+ index factoryは複数の近似近傍探索の手法を繋げるパイプラインをstringで表記するfaiss独自の記法です。
19
+ これにより、index factoryの文字列を変更するだけで様々な近似近傍探索の手法を試せます。
20
+ RVCでは以下のように使われています。
21
+
22
+ ```python
23
+ index = faiss.index_factory(256, "IVF%s,Flat" % n_ivf)
24
+ ```
25
+ index_factoryの引数のうち、1つ目はベクトルの次元数、2つ目はindex factoryの文字列で、3つ目には用いる距離を指定することができます。
26
+
27
+ より詳細な記法については
28
+ https://github.com/facebookresearch/faiss/wiki/The-index-factory
29
+
30
+ ## 距離指標
31
+ embeddingの類似度として用いられる代表的な指標として以下の二つがあります。
32
+
33
+ - ユークリッド距離(METRIC_L2)
34
+ - 内積(METRIC_INNER_PRODUCT)
35
+
36
+ ユークリッド距離では各次元において二乗の差をとり、全次元の差を足してから平方根をとります。これは日常的に用いる2次元、3次元での距離と同じです。
37
+ 内積はこのままでは類似度の指標として用いず、一般的にはL2ノルムで正規化してから内積をとるコサイン類似度を用います。
38
+
39
+ どちらがよいかは場合によりますが、word2vec等で得られるembeddingやArcFace等で学習した類似画像検索のモデルではコサイン類似度が用いられることが多いです。ベクトルXに対してl2正規化をnumpyで行う場合は、0 divisionを避けるために十分に小さな値をepsとして以下のコードで可能です。
40
+
41
+ ```python
42
+ X_normed = X / np.maximum(eps, np.linalg.norm(X, ord=2, axis=-1, keepdims=True))
43
+ ```
44
+
45
+ また、index factoryには第3引数に渡す値を選ぶことで計算に用いる距離指標を変更できます。
46
+
47
+ ```python
48
+ index = faiss.index_factory(dimention, text, faiss.METRIC_INNER_PRODUCT)
49
+ ```
50
+
51
+ ## IVF
52
+ IVF(Inverted file indexes)は全文検索における転置インデックスと似たようなアルゴリズムです。
53
+ 学習時には検索対象に対してkmeansでクラスタリングを行い、クラスタ中心を用いてボロノイ分割を行います。各データ点には一つずつクラスタが割り当てられるので、クラスタからデータ点を逆引きする辞書を作成します。
54
+
55
+ 例えば以下のようにクラスタが割り当てられた場合
56
+ |index|クラスタ|
57
+ |-----|-------|
58
+ |1|A|
59
+ |2|B|
60
+ |3|A|
61
+ |4|C|
62
+ |5|B|
63
+
64
+ 作成される転置インデックスは以下のようになります。
65
+
66
+ |クラスタ|index|
67
+ |-------|-----|
68
+ |A|1, 3|
69
+ |B|2, 5|
70
+ |C|4|
71
+
72
+ 検索時にはまずクラスタからn_probe個のクラスタを検索し、次にそれぞれのクラスタに属するデータ点について距離を計算します。
73
+
74
+ # 推奨されるパラメータ
75
+ indexの選び方については公式にガイドラインがあるので、それに準じて説明します。
76
+ https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index
77
+
78
+ 1M以下のデータセットにおいては4bit-PQが2023年4月時点ではfaissで利用できる最も効率的な手法です。
79
+ これをIVFと組み合わせ、4bit-PQで候補を絞り、最後に正確な指標で距離を再計算するには以下のindex factoryを用いることで記載できます。
80
+
81
+ ```python
82
+ index = faiss.index_factory(256, "IVF1024,PQ128x4fs,RFlat")
83
+ ```
84
+
85
+ ## IVFの推奨パラメータ
86
+ IVFの数が多すぎる場合、たとえばデータ数の数だけIVFによる粗量子化を行うと、これは愚直な全探索と同じになり効率が悪いです。
87
+ 1M以下の場合ではIVFの値はデータ点の数Nに対して4*sqrt(N) ~ 16*sqrt(N)に推奨しています。
88
+
89
+ n_probeはn_probeの数に比例して計算時間が増えるので、精度と相談して適切に選んでください。個人的にはRVCにおいてそこまで精度は必要ないと思うのでn_probe = 1で良いと思います。
90
+
91
+ ## FastScan
92
+ FastScanは直積量子化で大まかに距離を近似するのを、レジスタ内で行うことにより高速に行うようにした手法です。
93
+ 直積量子化は学習時にd次元ごと(通常はd=2)に独立してクラスタリングを行い、クラスタ同士の距離を事前計算してlookup tableを作成します。予測時はlookup tableを見ることで各次元の距離をO(1)で計算できます。
94
+ そのため、PQの次に指定する数字は通常ベクトルの半分の次元を指定します。
95
+
96
+ FastScanに関するより詳細な説明は公式のドキュメントを参照してください。
97
+ https://github.com/facebookresearch/faiss/wiki/Fast-accumulation-of-PQ-and-AQ-codes-(FastScan)
98
+
99
+ ## RFlat
100
+ RFlatはFastScanで計算した大まかな距離を、index factoryの第三引数で指定した正確な距離で再計算する指示です。
101
+ k個の近傍を取得する際は、k*k_factor個の点について再計算が行われます。
docs/jp/training_tips_ja.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ RVCの訓練における説明、およびTIPS
2
+ ===============================
3
+ 本TIPSではどのようにデータの訓練が行われているかを説明します。
4
+
5
+ # 訓練の流れ
6
+ GUIの訓練タブのstepに沿って説明します。
7
+
8
+ ## step1
9
+ 実験名の設定を行います。
10
+
11
+ また、モデルに音高ガイド(ピッチ)を考慮させるかもここで設定できます。考慮させない場合はモデルは軽量になりますが、歌唱には向かなくなります。
12
+
13
+ 各実験のデータは`/logs/実験名/`に配置されます。
14
+
15
+ ## step2a
16
+ 音声の読み込みと前処理を行います。
17
+
18
+ ### load audio
19
+ 音声のあるフォルダを指定すると、そのフォルダ内にある音声ファイルを自動で読み込みます。
20
+ 例えば`C:Users\hoge\voices`を指定した場合、`C:Users\hoge\voices\voice.mp3`は読み込まれますが、`C:Users\hoge\voices\dir\voice.mp3`は読み込まれません。
21
+
22
+ 音声の読み込みには内部でffmpegを利用しているので、ffmpegで対応している拡張子であれば自動的に読み込まれます。
23
+ ffmpegでint16に変換した後、float32に変換し、-1 ~ 1の間に正規化されます。
24
+
25
+ ### denoising
26
+ 音声についてscipyのfiltfiltによる平滑化を行います。
27
+
28
+ ### 音声の分割
29
+ 入力した音声はまず、一定期間(max_sil_kept=5秒?)より長く無音が続く部分を検知して音声を分割します。無音で音声を分割した後は、0.3秒のoverlapを含む4秒ごとに音声を分割します。4秒以内に区切られた音声は、音量の正規化を行った後wavファイルを`/logs/実験名/0_gt_wavs`に、そこから16kのサンプリングレートに変換して`/logs/実験名/1_16k_wavs`にwavファイルで保存します。
30
+
31
+ ## step2b
32
+ ### ピッチの抽出
33
+ wavファイルからピッチ(音の高低)の情報を抽出します。parselmouthやpyworldに内蔵されている手法でピッチ情報(=f0)を抽出し、`/logs/実験名/2a_f0`に保存します。その後、ピッチ情報を対数で変換して1~255の整数に変換し、`/logs/実験名/2b-f0nsf`に保存します。
34
+
35
+ ### feature_printの抽出
36
+ HuBERTを用いてwavファイルを事前にembeddingに変換します。`/logs/実験名/1_16k_wavs`に保存したwavファイルを読み込み、HuBERTでwavファイルを256次元の特徴量に変換し、npy形式で`/logs/実験名/3_feature256`に保存します。
37
+
38
+ ## step3
39
+ モデルのトレーニングを行います。
40
+ ### 初心者向け用語解説
41
+ 深層学習ではデータセットを分割し、少しずつ学習を進めていきます。一回のモデルの更新(step)では、batch_size個のデータを取り出し予測と誤差の修正を行います。これをデータセットに対して一通り行うと一epochと数えます。
42
+
43
+ そのため、学習時間は 1step当たりの学習時間 x (データセット内のデータ数 ÷ バッチサイズ) x epoch数 かかります。一般にバッチサイズを大きくするほど学習は安定し、(1step当たりの学習時間÷バッチサイズ)は小さくなりますが、その分GPUのメモリを多く使用します。GPUのRAMはnvidia-smiコマンド等で確認できます。実行環境のマシンに合わせてバッチサイズをできるだけ大きくするとより短時間で学習が可能です。
44
+
45
+ ### pretrained modelの指定
46
+ RVCではモデルの訓練を0からではなく、事前学習済みの重みから開始するため、少ないデータセットで学習を行えます。
47
+
48
+ デフォルトでは
49
+
50
+ - 音高ガイドを考慮する場合、`RVCのある場所/pretrained/f0G40k.pth`と`RVCのある場所/pretrained/f0D40k.pth`を読み込みます。
51
+ - 音高ガイドを考慮しない場合、`RVCのある場所/pretrained/G40k.pth`と`RVCのある場所/pretrained/D40k.pth`を読み込みます。
52
+
53
+ 学習時はsave_every_epochごとにモデルのパラメータが`logs/実験名/G_{}.pth`と`logs/実験名/D_{}.pth`に保存されますが、このパスを指定することで学習を再開したり、もしくは違う実験で学習したモデルの重みから学習を開始できます。
54
+
55
+ ### indexの学習
56
+ RVCでは学習時に使われたHuBERTの特徴量を保存し、推論時は学習時の特徴量から近い特徴量を探してきて推論を行います。この検索を高速に行うために事前にindexの学習を行います。
57
+ indexの学習には近似近傍探索ライブラリのfaissを用います。`/logs/実験名/3_feature256`の特徴量を読み込み、それを用いて学習したindexを`/logs/実験名/add_XXX.index`として保存します。
58
+ (20230428updateよりtotal_fea.npyはindexから読み込むので不要になりました。)
59
+
60
+ ### ボタンの説明
61
+ - モデルのトレーニング: step2bまでを実行した後、このボタンを押すとモデルの学習を行います。
62
+ - 特徴インデックスのトレーニング: モデルのトレーニング後、indexの学習を行います。
63
+ - ワンクリックトレーニング: step2bまでとモデルのトレーニング、特徴インデックスのトレーニングを一括で行います。
64
+
docs/kr/Changelog_KO.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 2023-08-13
2
+ 1-정기적인 버그 수정
3
+ - 최소 총 에포크 수를 1로 변경하고, 최소 총 에포크 수를 2로 변경합니다.
4
+ - 사전 훈련(pre-train) 모델을 사용하지 않는 훈련 오류 수정
5
+ - 반주 보컬 분리 후 그래픽 메모리 지우기
6
+ - 페이즈 저장 경로 절대 경로를 상대 경로로 변경
7
+ - 공백이 포함된 경로 지원(훈련 세트 경로와 실험 이름 모두 지원되며 더 이상 오류가 보고되지 않음)
8
+ - 파일 목록에서 필수 utf8 인코딩 취소
9
+ - 실시간 음성 변경 중 faiss 검색으로 인한 CPU 소모 문제 해결
10
+
11
+ 2-키 업데이트
12
+ - 현재 가장 강력한 오픈 소스 보컬 피치 추출 모델 RMVPE를 훈련하고, 이를 RVC 훈련, 오프라인/실시간 추론에 사용하며, PyTorch/Onx/DirectML을 지원합니다.
13
+ - 파이토치_DML을 통한 AMD 및 인텔 그래픽 카드 지원
14
+ (1) 실시간 음성 변화 (2) 추론 (3) 보컬 반주 분리 (4) 현재 지원되지 않는 훈련은 CPU 훈련으로 전환, Onnx_Dml을 통한 gpu의 RMVPE 추론 지원
15
+
16
+ ### 2023년 6월 18일 업데이트
17
+
18
+ - v2 버전에서 새로운 32k와 48k 사전 학습 모델을 추가.
19
+ - non-f0 모델들의 추론 오류 수정.
20
+ - 학습 세트가 1시간을 넘어가는 경우, 인덱스 생성 단계에서 minibatch-kmeans을 사용해, 학습속도 가속화.
21
+ - [huggingface](https://huggingface.co/spaces/lj1995/vocal2guitar)에서 vocal2guitar 제공.
22
+ - 데이터 처리 단계에서 이상 값 자동으로 제거.
23
+ - ONNX로 내보내는(export) 옵션 탭 추가.
24
+
25
+ 업데이트에 적용되지 않았지만 시도한 것들 :
26
+
27
+ - ~~시계열 차원을 추가하여 특징 검색을 진행했지만, 유의미한 효과는 없었습니다.~~
28
+ - ~~PCA 차원 축소를 추가하여 특징 검색을 진행했지만, 유의미한 효과는 없었습니다.~~
29
+ - ~~ONNX 추론을 지원하는 것에 실패했습니다. nsf 생성시, Pytorch가 필요하기 때문입니다.~~
30
+ - ~~훈련 중에 입력에 대한 음고, 성별, 이퀄라이저, 노이즈 등 무작위로 강화하는 것에, 유의미한 효과는 없었습니다.~~
31
+
32
+ 추후 업데이트 목록:
33
+
34
+ - ~~Vocos-RVC (소형 보코더) 통합 예정.~~
35
+ - ~~학습 단계에 음고 인식을 위한 Crepe 지원 예정.~~
36
+ - ~~Crepe의 정밀도를 REC-config와 동기화하여 지원 예정.~~
37
+ - FO 에디터 지원 예정.
38
+
39
+ ### 2023년 5월 28일 업데이트
40
+
41
+ - v2 jupyter notebook 추가, 한국어 업데이트 로그 추가, 의존성 모듈 일부 수정.
42
+ - 무성음 및 숨소리 보호 모드 추가.
43
+ - crepe-full pitch 감지 지원.
44
+ - UVR5 보컬 분리: 디버브 및 디-에코 모델 지원.
45
+ - index 이름에 experiment 이름과 버전 추가.
46
+ - 배치 음성 변환 처리 및 UVR5 보컬 분리 시, 사용자가 수동으로 출력 오디오의 내보내기(export) 형식을 선택할 수 있도록 지원.
47
+ - 32k 훈련 모델 지원 종료.
48
+
49
+ ### 2023년 5월 13일 업데이트
50
+
51
+ - 원클릭 패키지의 이전 버전 런타임 내, 불필요한 코드(lib.infer_pack 및 uvr5_pack) 제거.
52
+ - 훈련 세트 전처리의 유사 다중 처리 버그 수정.
53
+ - Harvest 피치 인식 알고리즘에 대한 중위수 필터링 반경 조정 추가.
54
+ - 오디오 내보낼 때, 후처리 리샘플링 지원.
55
+ - 훈련에 대한 다중 처리 "n_cpu" 설정이 "f0 추출"에서 "데이터 전처리 및 f0 추출"로 변경.
56
+ - logs 폴더 하의 인덱스 경로를 자동으로 감지 및 드롭다운 목록 기능 제공.
57
+ - 탭 페이지에 "자주 묻는 질문과 답변" 추가. (github RVC wiki 참조 가능)
58
+ - 동일한 입력 오디오 경로를 사용할 때 추론, Harvest 피치를 캐시.
59
+ (주의: Harvest 피치 추출을 사용하면 전체 파이프라인은 길고 반복적인 피치 추출 과정을 거치게됩니다. 캐싱을 하지 않는다면, 첫 inference 이후의 단계에서 timbre, 인덱스, 피치 중위수 필터링 반경 설정 등 대기시간이 엄청나게 길어집니다!)
60
+
61
+ ### 2023년 5월 14일 업데이트
62
+
63
+ - 입력의 볼륨 캡슐을 사용하여 출력의 볼륨 캡슐을 혼합하거나 대체. (입력이 무음이거나 출력의 노이즈 문제를 최소화 할 수 있습니다. 입력 오디오의 배경 노이즈(소음)가 큰 경우 해당 기능을 사용하지 않는 것이 좋습니다. 기본적으로 비활성화 되어있는 옵션입니다. (1: 비활성화 상태))
64
+ - 추출된 소형 모델을 지정된 빈도로 저장하는 기능을 지원. (다양한 에폭 하에서의 성능을 보려고 하지만 모든 대형 체크포인트를 저장하고 매번 ckpt 처리를 통해 소형 모델을 수동으로 추출하고 싶지 않은 경우 이 기능은 매우 유용합니다)
65
+ - 환경 변수를 설정하여 서버의 전역 프록시로 인한 "연결 오류" 문제 해결.
66
+ - 사전 훈련된 v2 모델 지원. (현재 40k 버전만 테스트를 위해 공개적으로 사용 가능하며, 다른 두 개의 샘플링 비율은 아직 완전히 훈련되지 않아 보���되었습니다.)
67
+ - 추론 전, 1을 초과하는 과도한 볼륨 제한.
68
+ - 데이터 전처리 매개변수 미세 조정.
69
+
70
+ ### 2023년 4월 9일 업데이트
71
+
72
+ - GPU 이용률 향상을 위해 훈련 파라미터 수정: A100은 25%에서 약 90%로 증가, V100: 50%에서 약 90%로 증가, 2060S: 60%에서 약 85%로 증가, P40: 25%에서 약 95%로 증가.
73
+ 훈련 속도가 크게 향상.
74
+ - 매개변수 기준 변경: total batch_size는 GPU당 batch_size를 의미.
75
+ - total_epoch 변경: 최대 한도가 100에서 1000으로 증가. 기본값이 10에서 20으로 증가.
76
+ - ckpt 추출이 피치를 잘못 인식하여 비정상적인 추론을 유발하는 문제 수정.
77
+ - 분산 훈련 과정에서 각 랭크마다 ckpt를 저장하는 문제 수정.
78
+ - 특성 추출 과정에 나노 특성 필터링 적용.
79
+ - 무음 입력/출력이 랜덤하게 소음을 생성하는 문제 수정. (이전 모델은 새 데이터셋으로 다시 훈련해야 합니다)
80
+
81
+ ### 2023년 4월 16일 업데이트
82
+
83
+ - 로컬 실시간 음성 변경 미니-GUI 추가, go-realtime-gui.bat를 더블 클릭하여 시작.
84
+ - 훈련 및 추론 중 50Hz 이하의 주파수 대역에 대해 필터링 적용.
85
+ - 훈련 및 추론의 pyworld 최소 피치 추출을 기본 80에서 50으로 낮춤. 이로 인해, 50-80Hz 사이의 남성 저음이 무음화되지 않습니다.
86
+ - 시스템 지역에 따른 WebUI 언어 변경 지원. (현재 en_US, ja_JP, zh_CN, zh_HK, zh_SG, zh_TW를 지원하며, 지원되지 않는 경우 기본값은 en_US)
87
+ - 일부 GPU의 인식 수정. (예: V100-16G 인식 실패, P4 인식 실패)
88
+
89
+ ### 2023년 4월 28일 업데이트
90
+
91
+ - Faiss 인덱스 설정 업그레이드로 속도가 더 빨라지고 품질이 향상.
92
+ - total_npy에 대한 의존성 제거. 추후의 모델 공유는 total_npy 입력을 필요로 하지 않습니다.
93
+ - 16 시리즈 GPU에 대한 제한 해제, 4GB VRAM GPU에 대한 4GB 추론 설정 제공.
94
+ - 일부 오디오 형식에 대한 UVR5 보컬 동반 분리에서의 버그 수정.
95
+ - 실시간 음성 변경 미니-GUI는 이제 non-40k 및 non-lazy 피치 모델을 지원합니다.
96
+
97
+ ### 추후 계획
98
+
99
+ Features:
100
+
101
+ - 다중 사용자 훈련 탭 지원.(최대 4명)
102
+
103
+ Base model:
104
+
105
+ - 훈련 데이터셋에 숨소리 wav 파일을 추가하여, 보컬의 호흡이 노이즈로 변환되는 문제 수정.
106
+ - 보컬 훈련 세트의 기본 모델을 추가하기 위한 작업을 진행중이며, 이는 향후에 발표될 예정.
docs/kr/README.ko.han.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <h1>Retrieval-based-Voice-Conversion-WebUI</h1>
4
+ VITS基盤의 簡單하고使用하기 쉬운音聲變換틀<br><br>
5
+
6
+ [![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
7
+ )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
8
+
9
+ <img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
10
+
11
+ [![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
12
+ [![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)
13
+ [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
14
+
15
+ [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
16
+
17
+ </div>
18
+
19
+ ------
20
+ [**更新日誌**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/Changelog_KO.md)
21
+
22
+ [**English**](../en/README.en.md) | [**中文简体**](../../README.md) | [**日本語**](../jp/README.ja.md) | [**한국어**](../kr/README.ko.md) ([**韓國語**](../kr/README.ko.han.md)) | [**Türkçe**](../tr/README.tr.md)
23
+
24
+ > [示範映像](https://www.bilibili.com/video/BV1pm4y1z7Gm/)을 確認해 보세요!
25
+
26
+ > RVC를活用한實時間音聲變換: [w-okada/voice-changer](https://github.com/w-okada/voice-changer)
27
+
28
+ > 基本모델은 50時間假量의 高品質 오픈 소스 VCTK 데이터셋을 使用하였으므로, 著作權上의 念慮가 없으니 安心하고 使用하시기 바랍니다.
29
+
30
+ > 著作權問題가 없는 高品質의 노래를 以後에도 繼續해서 訓練할 豫定입니다.
31
+
32
+ ## 紹介
33
+ 本Repo는 다음과 같은 特徵을 가지고 있습니다:
34
+ + top1檢索을利用하여 入力音色特徵을 訓練세트音色特徵으로 代替하여 音色의漏出을 防止;
35
+ + 相對的으로 낮은性能의 GPU에서도 빠른訓練可能;
36
+ + 적은量의 데이터로 訓練해도 좋은 結果를 얻을 수 있음 (最小10分以上의 低雜음音聲데이터를 使用하는 것을 勸獎);
37
+ + 모델融合을通한 音色의 變調可能 (ckpt處理탭->ckpt混合選擇);
38
+ + 使用하기 쉬운 WebUI (웹 使用者인터페이스);
39
+ + UVR5 모델을 利用하여 목소리와 背景音樂의 빠른 分離;
40
+
41
+ ## 環境의準備
42
+ poetry를通해 依存를設置하는 것을 勸獎합니다.
43
+
44
+ 다음命令은 Python 버전3.8以上의環境에서 實行되어야 합니다:
45
+ ```bash
46
+ # PyTorch 關聯主要依存設置, 이미設置되어 있는 境遇 건너뛰기 可能
47
+ # 參照: https://pytorch.org/get-started/locally/
48
+ pip install torch torchvision torchaudio
49
+
50
+ # Windows + Nvidia Ampere Architecture(RTX30xx)를 使用하고 있다面, #21 에서 명시된 것과 같이 PyTorch에 맞는 CUDA 버전을 指定해야 합니다.
51
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
52
+
53
+ # Poetry 設置, 이미設置되어 있는 境遇 건너뛰기 可能
54
+ # Reference: https://python-poetry.org/docs/#installation
55
+ curl -sSL https://install.python-poetry.org | python3 -
56
+
57
+ # 依存設置
58
+ poetry install
59
+ ```
60
+ pip를 活用하여依存를 設置하여도 無妨합니다.
61
+
62
+ ```bash
63
+ pip install -r requirements.txt
64
+ ```
65
+
66
+ ## 其他預備모델準備
67
+ RVC 모델은 推論과訓練을 依하여 다른 預備모델이 必要합니다.
68
+
69
+ [Huggingface space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)를 通해서 다운로드 할 수 있습니다.
70
+
71
+ 다음은 RVC에 必要한 預備모델 및 其他 파일 目錄입니다:
72
+ ```bash
73
+ ./assets/hubert/hubert_base.pt
74
+
75
+ ./assets/pretrained
76
+
77
+ ./assets/uvr5_weights
78
+
79
+ V2 버전 모델을 테스트하려면 추가 다운로드가 필요합니다.
80
+
81
+ ./assets/pretrained_v2
82
+
83
+ # Windows를 使用하는境遇 이 사전도 必要할 수 있습니다. FFmpeg가 設置되어 있으면 건너뛰어도 됩니다.
84
+ ffmpeg.exe
85
+ ```
86
+ 그後 以下의 命令을 使用하여 WebUI를 始作할 수 있습니다:
87
+ ```bash
88
+ python infer-web.py
89
+ ```
90
+ Windows를 使用하는境遇 `RVC-beta.7z`를 다운로드 및 壓縮解除하여 RVC를 直接使用하거나 `go-web.bat`을 使用하여 WebUi를 直接할 수 있습니다.
91
+
92
+ ## 參考
93
+ + [ContentVec](https://github.com/auspicious3000/contentvec/)
94
+ + [VITS](https://github.com/jaywalnut310/vits)
95
+ + [HIFIGAN](https://github.com/jik876/hifi-gan)
96
+ + [Gradio](https://github.com/gradio-app/gradio)
97
+ + [FFmpeg](https://github.com/FFmpeg/FFmpeg)
98
+ + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
99
+ + [audio-slicer](https://github.com/openvpi/audio-slicer)
100
+ ## 모든寄與者분들의勞力에感謝드립니다
101
+
102
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
103
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
104
+ </a>
105
+
docs/kr/README.ko.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <h1>Retrieval-based-Voice-Conversion-WebUI</h1>
4
+ VITS 기반의 간단하고 사용하기 쉬운 음성 변환 프레임워크.<br><br>
5
+
6
+ [![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
7
+ )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
8
+
9
+ <img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
10
+
11
+ [![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
12
+ [![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)
13
+ [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
14
+
15
+ [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ [**업데이트 로그**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/Changelog_KO.md)
22
+
23
+ [**English**](../en/README.en.md) | [**中文简体**](../../README.md) | [**日本語**](../jp/README.ja.md) | [**한국어**](../kr/README.ko.md) ([**韓國語**](../kr/README.ko.han.md)) | [**Türkçe**](../tr/README.tr.md)
24
+
25
+ > [데모 영상](https://www.bilibili.com/video/BV1pm4y1z7Gm/)을 확인해 보세요!
26
+
27
+ > RVC를 활용한 실시간 음성변환: [w-okada/voice-changer](https://github.com/w-okada/voice-changer)
28
+
29
+ > 기본 모델은 50시간 가량의 고퀄리티 오픈 소스 VCTK 데이터셋을 사용하였으므로, 저작권상의 염려가 없으니 안심하고 사용하시기 바랍니다.
30
+
31
+ > 저작권 문제가 없는 고퀄리티의 노래를 이후에도 계속해서 훈련할 예정입니다.
32
+
33
+ ## 소개
34
+
35
+ 본 Repo는 다음과 같은 특징을 가지고 있습니다:
36
+
37
+ - top1 검색을 이용하여 입력 음색 특징을 훈련 세트 음색 특징으로 대체하여 음색의 누출을 방지;
38
+ - 상대적으로 낮은 성능의 GPU에서도 빠른 훈련 가능;
39
+ - 적은 양의 데이터로 훈련해도 좋은 결과를 얻을 수 있음 (최소 10분 이상의 저잡음 음성 데이터를 사용하는 것을 권장);
40
+ - 모델 융합을 통한 음색의 변조 가능 (ckpt 처리 탭->ckpt 병합 선택);
41
+ - 사용하기 쉬운 WebUI (웹 인터페이스);
42
+ - UVR5 모델을 이용하여 목소리와 배경음악의 빠른 분리;
43
+
44
+ ## 환경의 준비
45
+
46
+ poetry를 통해 dependecies를 설치하는 것을 권장합니다.
47
+
48
+ 다음 명령은 Python 버전 3.8 이상의 환경에서 실행되어야 합니다:
49
+
50
+ ```bash
51
+ # PyTorch 관련 주요 dependencies 설치, 이미 설치되어 있는 경우 건너뛰기 가능
52
+ # 참조: https://pytorch.org/get-started/locally/
53
+ pip install torch torchvision torchaudio
54
+
55
+ # Windows + Nvidia Ampere Architecture(RTX30xx)를 사용하고 있다면, https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/21 에서 명시된 것과 같이 PyTorch에 맞는 CUDA 버전을 지정해야 합니다.
56
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
57
+
58
+ # Poetry 설치, 이미 설치되어 있는 경우 건너뛰기 가능
59
+ # Reference: https://python-poetry.org/docs/#installation
60
+ curl -sSL https://install.python-poetry.org | python3 -
61
+
62
+ # Dependecies 설치
63
+ poetry install
64
+ ```
65
+
66
+ pip를 활용하여 dependencies를 설치하여도 무방합니다.
67
+
68
+ ```bash
69
+ pip install -r requirements.txt
70
+ ```
71
+
72
+ ## 기타 사전 모델 준비
73
+
74
+ RVC 모델은 추론과 훈련을 위하여 다른 사전 모델이 필요합니다.
75
+
76
+ [Huggingface space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)를 통해서 다운로드 할 수 있습니다.
77
+
78
+ 다음은 RVC에 필요한 사전 모델 및 기타 파일 목록입니다:
79
+
80
+ ```bash
81
+ ./assets/hubert/hubert_base.pt
82
+
83
+ ./assets/pretrained
84
+
85
+ ./assets/uvr5_weights
86
+
87
+ V2 버전 모델을 테스트하려면 추가 다운로드가 필요합니다.
88
+
89
+ ./assets/pretrained_v2
90
+
91
+ # Windows를 사용하는 경우 이 사전도 필요할 수 있습니다. FFmpeg가 설치되어 있으면 건너뛰어도 됩니다.
92
+ ffmpeg.exe
93
+ ```
94
+
95
+ 그 후 이하의 명령을 사용하여 WebUI를 시작할 수 있습니다:
96
+
97
+ ```bash
98
+ python infer-web.py
99
+ ```
100
+
101
+ Windows를 사용하는 경우 `RVC-beta.7z`를 다운로드 및 압축 해제하여 RVC를 직접 사용하거나 `go-web.bat`을 사용하여 WebUi를 시작할 수 있습니다.
102
+
103
+ ## 참고
104
+
105
+ - [ContentVec](https://github.com/auspicious3000/contentvec/)
106
+ - [VITS](https://github.com/jaywalnut310/vits)
107
+ - [HIFIGAN](https://github.com/jik876/hifi-gan)
108
+ - [Gradio](https://github.com/gradio-app/gradio)
109
+ - [FFmpeg](https://github.com/FFmpeg/FFmpeg)
110
+ - [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
111
+ - [audio-slicer](https://github.com/openvpi/audio-slicer)
112
+
113
+ ## 모든 기여자 분들의 노력에 감사드립니다.
114
+
115
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
116
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
117
+ </a>
docs/kr/faiss_tips_ko.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Facebook AI Similarity Search (Faiss) 팁
2
+ ==================
3
+ # Faiss에 대하여
4
+ Faiss 는 Facebook Research가 개발하는, 고밀도 벡터 이웃 검색 라이브러리입니다. 근사 근접 탐색법 (Approximate Neigbor Search)은 약간의 정확성을 희생하여 유사 벡터를 고속으로 찾습니다.
5
+
6
+ ## RVC에 있어서 Faiss
7
+ RVC에서는 HuBERT로 변환한 feature의 embedding을 위해 훈련 데이터에서 생성된 embedding과 유사한 embadding을 검색하고 혼합하여 원래의 음성에 더욱 가까운 변환을 달성합니다. 그러나, 이 탐색법은 단순히 수행하면 시간이 다소 소모되므로, 근사 근접 탐색법을 통해 고속 변환을 가능케 하고 있습니다.
8
+
9
+ # 구현 개요
10
+ 모델이 위치한 `/logs/your-experiment/3_feature256`에는 각 음성 데이터에서 HuBERT가 추출한 feature들이 있습니다. 여기에서 파일 이름별로 정렬된 npy 파일을 읽고, 벡터를 연결하여 big_npy ([N, 256] 모양의 벡터) 를 만듭니다. big_npy를 `/logs/your-experiment/total_fea.npy`로 저장한 후, Faiss로 학습시킵니다.
11
+
12
+ 2023/04/18 기준으로, Faiss의 Index Factory 기능을 이용해, L2 거리에 근거하는 IVF를 이용하고 있습니다. IVF의 분할수(n_ivf)는 N//39로, n_probe는 int(np.power(n_ivf, 0.3))가 사용되고 있습니다. (infer-web.py의 train_index 주위를 찾으십시오.)
13
+
14
+ 이 팁에서는 먼저 이러한 매개 변수의 의미를 설명하고, 개발자가 추후 더 나은 index를 작성할 수 있도록 하는 조언을 작성합니다.
15
+
16
+ # 방법의 설명
17
+ ## Index factory
18
+ index factory는 여러 근사 근접 탐색법을 문자열로 연결하는 pipeline을 문자열로 표기하는 Faiss만의 독자적인 기법입니다. 이를 통해 index factory의 문자열을 변경하는 것만으로 다양한 근사 근접 탐색을 시도해 볼 수 있습니다. RVC에서는 다음과 같이 사용됩니다:
19
+
20
+ ```python
21
+ index = Faiss.index_factory(256, "IVF%s,Flat" % n_ivf)
22
+ ```
23
+ `index_factory`의 인수들 중 첫 번째는 벡터의 차원 수이고, 두번째는 index factory 문자열이며, 세번째에는 사용할 거리를 지정할 수 있습니다.
24
+
25
+ 기법의 보다 자세한 설명은 https://github.com/facebookresearch/Faiss/wiki/The-index-factory 를 확인해 주십시오.
26
+
27
+ ## 거리에 대한 index
28
+ embedding의 유사도로서 사용되는 대표적인 지표로서 이하의 2개가 있습니다.
29
+
30
+ - 유클리드 거리 (METRIC_L2)
31
+ - 내적(内積) (METRIC_INNER_PRODUCT)
32
+
33
+ 유클리드 거리에서는 각 차원에서 제곱의 차를 구하고, 각 차원에서 구한 차를 모두 더한 후 제곱근을 취합니다. 이것은 일상적으로 사용되는 2차원, 3차원에서의 거리의 연산법과 같습니다. 내적은 그 값을 그대로 유사도 지표로 사용하지 않고, L2 정규화를 한 이후 내적을 취하는 코사인 유사도를 사용합니다.
34
+
35
+ 어느 쪽이 더 좋은지는 경우에 따라 다르지만, word2vec에서 얻은 embedding 및 ArcFace를 활용한 이미지 검색 모델은 코사인 유사성이 이용되는 경우가 많습니다. numpy를 사용하여 벡터 X에 대해 L2 정규화를 하고자 하는 경우, 0 division을 피하기 위해 충분히 작은 값을 eps로 한 뒤 이하에 코드를 활용하면 됩니다.
36
+
37
+ ```python
38
+ X_normed = X / np.maximum(eps, np.linalg.norm(X, ord=2, axis=-1, keepdims=True))
39
+ ```
40
+
41
+ 또한, `index factory`의 3번째 인수에 건네주는 값을 선택하는 것을 통해 계산에 사용하는 거리 index를 변경할 수 있습니다.
42
+
43
+ ```python
44
+ index = Faiss.index_factory(dimention, text, Faiss.METRIC_INNER_PRODUCT)
45
+ ```
46
+
47
+ ## IVF
48
+ IVF (Inverted file indexes)는 역색인 탐색법과 유사한 알고리즘입니다. 학습시에는 검색 대상에 대해 k-평균 군집법을 실시하고 클러스터 중심을 이용해 보로노이 분할을 실시합니다. 각 데이터 포인트에는 클러스터가 할당되므로, 클러스터에서 데이터 포인트를 조회하는 dictionary를 만듭니다.
49
+
50
+ 예를 들어, 클러스터가 다음과 같이 할당된 경우
51
+ |index|Cluster|
52
+ |-----|-------|
53
+ |1|A|
54
+ |2|B|
55
+ |3|A|
56
+ |4|C|
57
+ |5|B|
58
+
59
+ IVF 이후의 결과는 다음과 같습니다:
60
+
61
+ |cluster|index|
62
+ |-------|-----|
63
+ |A|1, 3|
64
+ |B|2, 5|
65
+ |C|4|
66
+
67
+ 탐색 시, 우선 클러스터에서 `n_probe`개의 클러스터를 탐색한 다음, 각 클러스터에 속한 데이터 포인트의 거리를 계산합니다.
68
+
69
+ # 권장 매개변수
70
+ index의 선택 방법에 대해서는 공식적으로 가이드 라인이 있으므로, 거기에 준해 설명합니다.
71
+ https://github.com/facebookresearch/Faiss/wiki/Guidelines-to-choose-an-index
72
+
73
+ 1M 이하의 데이터 세트에 있어서는 4bit-PQ가 2023년 4월 시점에서는 Faiss로 이용할 수 있는 가장 효율적인 수법입니다. 이것을 IVF와 조합해, 4bit-PQ로 후보를 추려내고, 마지막으로 이하의 index factory를 이용하여 정확한 지표로 거리��� 재계산하면 됩니다.
74
+
75
+ ```python
76
+ index = Faiss.index_factory(256, "IVF1024,PQ128x4fs,RFlat")
77
+ ```
78
+
79
+ ## IVF 권장 매개변수
80
+ IVF의 수가 너무 많으면, 가령 데이터 수의 수만큼 IVF로 양자화(Quantization)를 수행하면, 이것은 완전탐색과 같아져 효율이 나빠지게 됩니다. 1M 이하의 경우 IVF 값은 데이터 포인트 수 N에 대해 4sqrt(N) ~ 16sqrt(N)를 사용하는 것을 권장합니다.
81
+
82
+ n_probe는 n_probe의 수에 비례하여 계산 시간이 늘어나므로 정확도와 시간을 적절히 균형을 맞추어 주십시오. 개인적으로 RVC에 있어서 그렇게까지 정확도는 필요 없다고 생각하기 때문에 n_probe = 1이면 된다고 생각합니다.
83
+
84
+ ## FastScan
85
+ FastScan은 직적 양자화를 레지스터에서 수행함으로써 거리의 고속 근사를 가능하게 하는 방법입니다.직적 양자화는 학습시에 d차원마다(보통 d=2)에 독립적으로 클러스터링을 실시해, 클러스터끼리의 거리를 사전 계산해 lookup table를 작성합니다. 예측시는 lookup table을 보면 각 차원의 거리를 O(1)로 계산할 수 있습니다. 따라서 PQ 다음에 지정하는 숫자는 일반적으로 벡터의 절반 차원을 지정합니다.
86
+
87
+ FastScan에 대한 자세한 설명은 공식 문서를 참조하십시오.
88
+ https://github.com/facebookresearch/Faiss/wiki/Fast-accumulation-of-PQ-and-AQ-codes-(FastScan)
89
+
90
+ ## RFlat
91
+ RFlat은 FastScan이 계산한 대략적인 거리를 index factory의 3번째 인수로 지정한 정확한 거리로 다시 계산하라는 인스트럭션입니다. k개의 근접 변수를 가져올 때 k*k_factor개의 점에 대해 재계산이 이루어집니다.
92
+
93
+ # Embedding 테크닉
94
+ ## Alpha 쿼리 확장
95
+ 퀴리 확장이란 탐색에서 사용되는 기술로, 예를 들어 전문 탐색 시, 입력된 검색문에 단어를 몇 개를 추가함으로써 검색 정확도를 올리는 방법입니다. 백터 탐색을 위해서도 몇가지 방법이 제안되었는데, 그 중 α-쿼리 확장은 추가 학습이 필요 없는 매우 효과적인 방법으로 알려져 있습니다. [Attention-Based Query Expansion Learning](https://arxiv.org/abs/2007.08019)와 [2nd place solution of kaggle shopee competition](https://www.kaggle.com/code/lyakaap/2nd-place-solution/notebook) 논문에서 소개된 바 있습니다..
96
+
97
+ α-쿼리 확장은 한 벡터에 인접한 벡터를 유사도의 α곱한 가중치로 더해주면 됩니다. 코드로 예시를 들어 보겠습니다. big_npy를 α query expansion로 대체합니다.
98
+
99
+ ```python
100
+ alpha = 3.
101
+ index = Faiss.index_factory(256, "IVF512,PQ128x4fs,RFlat")
102
+ original_norm = np.maximum(np.linalg.norm(big_npy, ord=2, axis=1, keepdims=True), 1e-9)
103
+ big_npy /= original_norm
104
+ index.train(big_npy)
105
+ index.add(big_npy)
106
+ dist, neighbor = index.search(big_npy, num_expand)
107
+
108
+ expand_arrays = []
109
+ ixs = np.arange(big_npy.shape[0])
110
+ for i in range(-(-big_npy.shape[0]//batch_size)):
111
+ ix = ixs[i*batch_size:(i+1)*batch_size]
112
+ weight = np.power(np.einsum("nd,nmd->nm", big_npy[ix], big_npy[neighbor[ix]]), alpha)
113
+ expand_arrays.append(np.sum(big_npy[neighbor[ix]] * np.expand_dims(weight, axis=2),axis=1))
114
+ big_npy = np.concatenate(expand_arrays, axis=0)
115
+
116
+ # index version 정규화
117
+ big_npy = big_npy / np.maximum(np.linalg.norm(big_npy, ord=2, axis=1, keepdims=True), 1e-9)
118
+ ```
119
+
120
+ 위 테크닉은 탐색을 수행하는 쿼리에도, 탐색 대상 DB에도 적응 가능한 테크닉입니다.
121
+
122
+ ## MiniBatch KMeans에 의한 embedding 압축
123
+
124
+ total_fea.npy가 너무 클 경우 K-means를 이용하여 벡터를 작게 만드는 것이 가능합니다. 이하 코드로 embedding의 압축이 가능합니다. n_clusters에 압축하고자 하는 크기를 지정하고 batch_size에 256 * CPU의 코어 수를 지정함으로써 CPU 병렬화의 혜택을 충분히 얻을 수 있습니다.
125
+
126
+ ```python
127
+ import multiprocessing
128
+ from sklearn.cluster import MiniBatchKMeans
129
+ kmeans = MiniBatchKMeans(n_clusters=10000, batch_size=256 * multiprocessing.cpu_count(), init="random")
130
+ kmeans.fit(big_npy)
131
+ sample_npy = kmeans.cluster_centers_
132
+ ```
docs/kr/training_tips_ko.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ RVC 훈련에 대한 설명과 팁들
2
+ ======================================
3
+ 본 팁에서는 어떻게 데이터 훈련이 이루어지고 있는지 설명합니다.
4
+
5
+ # 훈련의 흐름
6
+ GUI의 훈련 탭의 단계를 따라 설명합니다.
7
+
8
+ ## step1
9
+ 실험 이름을 지정합니다. 또한, 모델이 피치(소리의 높낮이)를 고려해야 하는지 여부를 여기에서 설정할 수도 있습니다..
10
+ 각 실험을 위한 데이터는 `/logs/experiment name/`에 배치됩니다..
11
+
12
+ ## step2a
13
+ 음성 파일을 불러오고 전처리합니다.
14
+
15
+ ### 음성 파일 불러오기
16
+ 음성 파일이 있는 폴더를 지정하면 해당 폴더에 있는 음성 파일이 자동으로 가져와집니다.
17
+ 예를 들어 `C:Users\hoge\voices`를 지정하면 `C:Users\hoge\voices\voice.mp3`가 읽히지만 `C:Users\hoge\voices\dir\voice.mp3`는 읽히지 않습니다.
18
+
19
+ 음성 로드에는 내부적으로 ffmpeg를 이용하고 있으므로, ffmpeg로 대응하고 있는 확장자라면 자동적으로 읽힙니다.
20
+ ffmpeg에서 int16으로 변환한 후 float32로 변환하고 -1과 1 사이에 정규화됩니다.
21
+
22
+ ### 잡음 제거
23
+ 음성 파일에 대해 scipy의 filtfilt를 이용하여 잡음을 처리합니다.
24
+
25
+ ### 음성 분할
26
+ 입력한 음성 파일은 먼저 일정 기간(max_sil_kept=5초?)보다 길게 무음이 지속되는 부분을 감지하여 음성을 분할합니다.무음으로 음성을 분할한 후에는 0.3초의 overlap을 포함하여 4초마다 음성을 분할합니다.4초 이내에 구분된 음성은 음량의 정규화를 실시한 후 wav 파일을 `/logs/실험명/0_gt_wavs`로, 거기에서 16k의 샘플링 레이트로 변환해 `/logs/실험명/1_16k_wavs`에 wav 파일로 저장합니다.
27
+
28
+ ## step2b
29
+ ### 피치 추출
30
+ wav 파일에서 피치(소리의 높낮이) 정보를 추출합니다. parselmouth나 pyworld에 내장되어 있는 메서드으로 피치 정보(=f0)를 추출해, `/logs/실험명/2a_f0`에 저장합니다. 그 후 피치 정보를 로그로 변환하여 1~255 정수로 변환하고 `/logs/실험명/2b-f0nsf`에 저장합니다.
31
+
32
+ ### feature_print 추출
33
+ HuBERT를 이용하여 wav 파일을 미리 embedding으로 변환합니다. `/logs/실험명/1_16k_wavs`에 저장한 wav 파일을 읽고 HuBERT에서 wav 파일을 256차원 feature들로 변환한 후 npy 형식으로 `/logs/실험명/3_feature256`에 저장합니다.
34
+
35
+ ## step3
36
+ 모델의 훈련을 진행합니다.
37
+
38
+ ### 초보자용 용어 해설
39
+ 심층학습(딥러닝)에서는 데이터셋을 분할하여 조금씩 학습을 진행합니다.한 번의 모델 업데이트(step) 단계 당 batch_size개의 데이터를 탐색하여 예측과 오차를 수정합니다. 데이터셋 전부에 대해 이 작업을 한 번 수행하는 이를 하나의 epoch라고 계산합니다.
40
+
41
+ 따라서 학습 시간은 단계당 학습 시간 x (데이터셋 내 데이터의 수 / batch size) x epoch 수가 소요됩니다. 일반적으로 batch size가 클수록 학습이 안정적이게 됩니다. (step당 학습 시간 ÷ batch size)는 작아지지만 GPU 메모리를 더 많이 사용합니다. GPU RAM은 nvidia-smi 명령어를 통해 확인할 수 있습니다. 실행 환경에 따라 배치 크기를 최대한 늘리면 짧은 시간 내에 학습이 가능합니다.
42
+
43
+ ### 사전 학습된 모델 지정
44
+ RVC는 적은 데이터셋으로도 훈련이 가능하도록 사전 훈련된 가중치에서 모델 훈련을 시작합니다. 기본적으로 `rvc-location/pretrained/f0G40k.pth` 및 `rvc-location/pretrained/f0D40k.pth`를 불러옵니다. 학습을 할 시에, 모델 파라미터는 각 save_every_epoch별로 `logs/experiment name/G_{}.pth` 와 `logs/experiment name/D_{}.pth`로 저장이 되는데, 이 경로를 지정함으로써 학습을 재개하거나, 다른 실험에서 학습한 모델의 가중치에서 학습을 시작할 수 있습니다.
45
+
46
+ ### index의 학습
47
+ RVC에서는 학습시에 사용된 HuBERT의 feature값을 저장하고, 추론 시에는 학습 시 사용한 feature값과 유사한 feature 값을 탐색해 추론을 진행합니다. 이 탐색을 고속으로 수행하기 위해 사전에 index을 학습하게 됩니다.
48
+ Index 학습에는 근사 근접 탐색법 라이브러리인 Faiss를 사용하게 됩니다. `/logs/실험명/3_feature256`의 feature값을 불러와, 이를 모두 결합시킨 feature값을 `/logs/실험명/total_fea.npy`로서 저장, 그것을 사용해 학습한 index를`/logs/실험명/add_XXX.index`로 저장합니다.
49
+
50
+ ### 버튼 설명
51
+ - モデルのトレーニング (모델 학습): step2b까지 실행한 후, 이 버튼을 눌러 모델을 학습합니다.
52
+ - 特徴インデックスのトレーニング (특징 지수 훈련): 모델의 훈련 후, index를 학습합니다.
53
+ - ワンクリックトレーニング (원클릭 트레이닝): step2b까지의 모델 훈련, feature index 훈련을 일괄로 실시합니다.
docs/tr/Changelog_TR.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ### 2023-08-13
3
+ 1- Düzenli hata düzeltmeleri
4
+ - Minimum toplam epoch sayısını 1 olarak değiştirin ve minimum toplam epoch sayısını 2 olarak değiştirin
5
+ - Ön eğitim modellerini kullanmama nedeniyle oluşan eğitim hatalarını düzeltin
6
+ - Eşlik eden vokallerin ayrılmasından sonra grafik belleğini temizleyin
7
+ - Faiss kaydetme yolu mutlak yoldan göreli yola değiştirilmiştir
8
+ - Boşluk içeren yolu destekleyin (hem eğitim kümesi yolu hem de deney adı desteklenir ve artık hata rapor edilmez)
9
+ - Filelist, zorunlu utf8 kodlamasını iptal eder
10
+ - Gerçek zamanlı ses değişikliği sırasında faiss aramasından kaynaklanan CPU tüketim sorununu çözün
11
+
12
+ 2- Temel güncellemeler
13
+ - Geçerli en güçlü açık kaynak vokal ton çıkarma modeli RMVPE'yi eğitin ve RVC eğitimi, çevrimdışı/gerçek zamanlı çıkarım için kullanın, PyTorch/Onnx/DirectML destekler
14
+ - Pytorch_DML aracılığıyla AMD ve Intel grafik kartları için destek ekleyin
15
+
16
+ (1) Gerçek zamanlı ses değişimi (2) Çıkarım (3) Vokal eşlik ayrımı (4) Şu anda desteklenmeyen eğitim, CPU eğitimine geçiş yapacaktır; Onnx_Dml ile gpu için RMVPE çıkarımını destekler
17
+
18
+
19
+ ### 2023-06-18
20
+ - Yeni ön eğitilmiş v2 modeller: 32k ve 48k
21
+ - F0 modeli çıkarım hatalarını düzeltme
22
+ - Eğitim kümesi 1 saati aşarsa, özelliği şekil açısından küçültmek için otomatik minibatch-kmeans yapın, böylece indeks eğitimi, eklemesi ve araması çok daha hızlı olur.
23
+ - Bir oyunca vokal2guitar huggingface alanı sağlama
24
+ - Aykırı kısa kesim eğitim kümesi seslerini otomatik olarak silme
25
+ - Onnx dışa aktarma sekmesi
26
+
27
+ Başarısız deneyler:
28
+ - ~~Özellik çıkarımı: zamansal özellik çıkarımı ekleme: etkili değil~~
29
+ - ~~Özellik çıkarımı: PCAR boyut azaltma ekleme: arama daha yavaş~~
30
+ - ~~Eğitim sırasında rastgele veri artırma: etkili değil~~
31
+
32
+ Yapılacaklar listesi:
33
+ - ~~Vocos-RVC (küçük vokoder): etkili değil~~
34
+ - ~~Eğitim için Crepe desteği: RMVPE ile değiştirildi~~
35
+ - ~~Yarı hassas Crepe çıkarımı: RMVPE ile değiştirildi. Ve zor gerçekleştirilebilir.~~
36
+ - F0 düzenleyici desteği
37
+
38
+ ### 2023-05-28
39
+ - v2 jupyter notebook, korece değişiklik günlüğü, bazı çevre gereksinimlerini düzeltme
40
+ - Sesli olmayan ünsüz ve nefes koruma modu ekleme
41
+ - Crepe-full ton algılama desteği ekleme
42
+ - UVR5 vokal ayrımı: yankı kaldırma modelleri ve yankı kaldırma modelleri destekleme
43
+ - İndeks adında deney adı ve sürüm ekleme
44
+ - Toplu ses dönüşüm işleme ve UVR5 vokal ayrımı sırasında çıkış seslerinin ihracat formatını kullanıcıların manuel olarak seçmelerine olanak tanıma
45
+ - v1 32k model eğitimi artık desteklenmiyor
46
+
47
+ ### 2023-05-13
48
+ - Tek tıklamayla paketin eski sürümündeki çalışma zamanındaki gereksiz kodları temizleme: lib.infer_pack ve uvr5_pack
49
+ - Eğitim seti ön işleme içindeki sahte çoklu işlem hatasını düzeltme
50
+ - Harvest ton tanıma algoritması için ortanca filtre yarıçap ayarı ekleme
51
+ - Çıkış sesi için örnek alma örneği için yeniden örnekleme desteği ekleme
52
+ - Eğitim için "n_cpu" çoklu işlem ayarı, "f0 çıkarma" yerine "veri ön işleme ve f0 çıkarma" için değiştirildi
53
+ - Günlükler klasörü altındaki indeks yollarını otomatik olarak tespit etme ve bir açılır liste işlevi sağlama
54
+ - Sekme sayfasına "Sıkça Sorulan Sorular ve Cevaplar"ı ekleme (ayrıca github RVC wiki'ye de bakabilirsiniz)
55
+ - Çıkarım sırasında aynı giriş sesi yolunu kullanırken harvest tonunu önbelleğe alma (amaç: harvest ton çıkarımı kullanırken, tüm işlem hattı uzun ve tekrarlayan bir ton çıkarım işlemi geçirecektir. Önbellekleme kullanılmazsa, farklı timbre, indeks ve ton ortanca filtreleme yarıçapı ayarlarıyla deney yapan kullanıcılar, ilk çıkarım sonrası çok acı verici bir bekleme süreci yaşayacaktır)
56
+
57
+ ### 2023-05-14
58
+ - Girişin hacim zarfını çıktının hacim zarfıyla karıştırmak veya değiştirmek için girişin hacim zarfını kullanma (problemi "giriş sessizleştirme ve çıktı küçük
59
+
60
+ amplitüdlü gürültü" sorununu hafifletebilir. Giriş sesi arka plan gürültüsü yüksekse, açık olması önerilmez ve varsayılan olarak açık değildir (1 varsayılan olarak kapalı olarak kabul edilir)
61
+ - Belirli bir frekansta filtreleme uygulama eğitim ve çıkarım için 50Hz'nin altındaki frekans bantları için
62
+ - Pyworld'un varsayılan 80'den 50'ye minimum ton çıkarma sınırlamasını eğitim ve çıkarım için düşürme, 50-80Hz arasındaki erkek alçak seslerin sessizleştirilmemesine izin verme
63
+ - WebUI, sistem yereli diline göre dil değiştirme (şu anda en_US, ja_JP, zh_CN, zh_HK, zh_SG, zh_TW'yi destekliyor; desteklenmeyen durumda varsayılan olarak en_US'ye geçer)
64
+ - Belirli bir giriş sesi yolunu kullanırken harvest tonunu önbelleğe alma (amaç: harvest ton çıkarma kullanırken, tüm işlem hattı uzun ve tekrarlayan bir ton çıkarma süreci geçirecektir. Önbellekleme kullanılmazsa, farklı timbre, indeks ve ton ortanca filtreleme yarıçapı ayarlarıyla deney yapan kullanıcılar, ilk çıkarım sonrası çok acı verici bir bekleme süreci yaşayacaktır)
65
+
66
+ ### 2023-04-09 Güncellemesi
67
+ - GPU kullanım oranını artırmak için eğitim parametrelerini düzeltme: A100, %25'ten yaklaşık %90'a, V100: %50'den yaklaşık %90'a, 2060S: %60'tan yaklaşık %85'e, P40: %25'ten yaklaşık %95'e; eğitim hızını önemli ölçüde artırma
68
+ - Parametre değişti: toplam_batch_size artık GPU başına batch_size
69
+ - Toplam_epoch değişti: maksimum sınırı 1000'e yükseltildi; varsayılan 10'dan 20'ye yükseltildi
70
+ - ckpt çıkarımı ile çalma tanıma hatasını düzeltme, anormal çıkarım oluşturan
71
+ - Dağıtılmış eğitimde her sıra için ckpt kaydetme sorununu düzeltme
72
+ - Özellik çıkarımı için NaN özellik filtrelemesi uygulama
73
+ - Sessiz giriş/çıkışın rastgele ünsüzler veya gürültü üretme sorununu düzeltme (eski modeller yeni bir veri kümesiyle tekrar eğitilmelidir)
74
+
75
+ ### 2023-04-16 Güncellemesi
76
+ - Yerel gerçek zamanlı ses değiştirme mini-GUI'si ekleme, çift tıklayarak go-realtime-gui.bat ile başlayın
77
+ - Eğitim ve çıkarım sırasında 50Hz'nin altındaki frekans bantlarını filtreleme uygulama
78
+ - Pyworld'deki varsayılan 80'den 50'ye minimum ton çıkarma sınırlamasını eğitim ve çıkarım için düşürme, 50-80Hz arasındaki erkek alçak seslerin sessizleştirilmemesine izin verme
79
+ - WebUI, sistem yereli diline göre dil değiştirme (şu anda en_US, ja_JP, zh_CN, zh_HK, zh_SG, zh_TW'yi destekliyor; desteklenmeyen durumda varsayılan olarak en_US'ye geçer)
80
+ - Bazı GPU'ların tanınmasını düzeltme (örneğin, V100-16G tanınmama sorunu, P4 tanınmama sorunu)
81
+
82
+ ### 2023-04-28 Güncellemesi
83
+ - Daha hızlı hız ve daha yüksek kalite için faiss indeks ayarlarını yükseltme
84
+ - Toplam_npy bağımlılığını kaldırma; gelecekteki model paylaşımları için total_npy girdisi gerekmeyecek
85
+ - 16-serisi GPU'lar için kısıtlamaları açma, 4GB VRAM GPU'lar için 4GB çıkarım ayarları sağlama
86
+ - Belirli ses biçimlerine yönelik UVR5 vokal eşlik ayrımındaki hata düzeltme
87
+ - Gerçek zamanlı ses değiştirme mini-GUI şimdi 40k dışı ve tembel ton modellerini destekler
88
+
89
+ ### Gelecekteki Planlar:
90
+ Özellikler:
91
+ - Her epoch kaydetmek için küçük modeller çıkar seçeneğini ekleme
92
+ - Çıkarım sırasında çıkış seslerini belirtilen yolda ekstra mp3 olarak kaydetme seçeneğini ekleme
93
+ - Birden fazla kişinin eğitim sekmesini destekleme (en fazla 4 kişiye kadar)
94
+
95
+ Temel model:
96
+ - Bozuk nefes seslerinin sorununu düzeltmek için nefes alma wav dosyalarını eğitim veri kümesine eklemek
97
+ - Şu anda genişletilmiş bir şarkı veri kümesiyle temel model eğitimi yapıyoruz ve gelecekte yayınlanacak
docs/tr/README.tr.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div align="center">
3
+
4
+ <h1>Çekme Temelli Ses Dönüşümü Web Arayüzü</h1>
5
+ VITS'e dayalı kullanımı kolay bir Ses Dönüşümü çerçevesi.<br><br>
6
+
7
+ [![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
8
+ )](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
9
+
10
+ <img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
11
+
12
+ [![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
13
+ [![Lisans](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)
14
+ [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
15
+
16
+ [![Discord](https://img.shields.io/badge/RVC%20Geliştiricileri-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
17
+
18
+ </div>
19
+
20
+ ------
21
+ [**Değişiklik Geçmişi**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/docs/Changelog_TR.md) | [**SSS (Sıkça Sorulan Sorular)**](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/wiki/SSS-(Sıkça-Sorulan-Sorular))
22
+
23
+ [**İngilizce**](../en/README.en.md) | [**中文简体**](../../README.md) | [**日本語**](../jp/README.ja.md) | [**한국어**](../kr/README.ko.md) ([**韓國語**](../kr/README.ko.han.md)) | [**Türkçe**](../tr/README.tr.md)
24
+
25
+ Burada [Demo Video'muzu](https://www.bilibili.com/video/BV1pm4y1z7Gm/) izleyebilirsiniz!
26
+
27
+ RVC Kullanarak Gerçek Zamanlı Ses Dönüşüm Yazılımı: [w-okada/voice-changer](https://github.com/w-okada/voice-changer)
28
+
29
+ > Ön eğitim modeli için veri kümesi neredeyse 50 saatlik yüksek kaliteli VCTK açık kaynak veri kümesini kullanır.
30
+
31
+ > Yüksek kaliteli lisanslı şarkı veri setleri telif hakkı ihlali olmadan kullanımınız için eklenecektir.
32
+
33
+ > Lütfen daha büyük parametrelere, daha fazla eğitim verisine sahip RVCv3'ün ön eğitimli temel modeline göz atın; daha iyi sonuçlar, değişmeyen çıkarsama hızı ve daha az eğitim verisi gerektirir.
34
+
35
+ ## Özet
36
+ Bu depo aşağıdaki özelliklere sahiptir:
37
+ + Ton sızıntısını en aza indirmek için kaynak özelliğini en iyi çıkarımı kullanarak eğitim kümesi özelliği ile değiştirme;
38
+ + Kolay ve hızlı eğitim, hatta nispeten zayıf grafik kartlarında bile;
39
+ + Az miktarda veriyle bile nispeten iyi sonuçlar alın (>=10 dakika düşük gürültülü konuşma önerilir);
40
+ + Timbraları değiştirmek için model birleştirmeyi destekleme (ckpt işleme sekmesi-> ckpt birleştir);
41
+ + Kullanımı kolay Web arayüzü;
42
+ + UVR5 modelini kullanarak hızla vokalleri ve enstrümanları ayırma.
43
+ + En güçlü Yüksek tiz Ses Çıkarma Algoritması [InterSpeech2023-RMVPE](#Krediler) sessiz ses sorununu önlemek için kullanılır. En iyi sonuçları (önemli ölçüde) sağlar ve Crepe_full'den daha hızlı çalışır, hatta daha düşük kaynak tüketimi sağlar.
44
+ + AMD/Intel grafik kartları hızlandırması desteklenir.
45
+ + Intel ARC grafik kartları hızlandırması IPEX ile desteklenir.
46
+
47
+ ## Ortamın Hazırlanması
48
+ Aşağıdaki komutlar, Python sürümü 3.8 veya daha yüksek olan bir ortamda çalıştırılmalıdır.
49
+
50
+ (Windows/Linux)
51
+ İlk olarak ana bağımlılıkları pip aracılığıyla kurun:
52
+ ```bash
53
+ # PyTorch ile ilgili temel bağımlılıkları kurun, zaten kuruluysa atlayın
54
+ # Referans: https://pytorch.org/get-started/locally/
55
+ pip install torch torchvision torchaudio
56
+
57
+ # Windows + Nvidia Ampere Mimarisi(RTX30xx) için, https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/21 deneyime göre pytorch'a karşılık gelen cuda sürümünü belirtmeniz gerekebilir
58
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
59
+ ```
60
+
61
+ Sonra poetry kullanarak diğer bağımlılıkları kurabilirsiniz:
62
+ ```bash
63
+ # Poetry bağımlılık yönetim aracını kurun, zaten kuruluysa atlayın
64
+ # Referans: https://python-poetry.org/docs/#installation
65
+ curl -sSL https://install.python-poetry.org | python3 -
66
+
67
+ # Projeyi bağımlılıkları kurun
68
+ poetry install
69
+ ```
70
+
71
+ Ayrıca bunları pip kullanarak da kurabilirsiniz:
72
+ ```bash
73
+
74
+ Nvidia grafik kartları için
75
+ pip install -r requirements.txt
76
+
77
+ AMD/Intel grafik kartları için:
78
+ pip install -r requirements-dml.txt
79
+
80
+ Intel ARC grafik kartları için Linux / WSL ile Python 3.10 kullanarak:
81
+ pip install -r requirements-ipex.txt
82
+
83
+ ```
84
+
85
+ ------
86
+ Mac kullanıcıları `run.sh` aracılığıyla bağımlılıkları kurabilir:
87
+ ```bash
88
+ sh ./run.sh
89
+ ```
90
+
91
+ ## Diğer Ön Modellerin Hazırlanması
92
+ RVC'nin çıkarım ve eğitim yapması için diğer ön modellere ihtiyacı vardır.
93
+
94
+ Bu ön modelleri [Huggingface alanımızdan](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) indirmeniz gerekecektir.
95
+
96
+ İşte RVC'nin ihtiyaç duyduğu diğer ön modellerin ve dosyaların bir listesi:
97
+ ```bash
98
+ ./assets/hubert/hubert_base.pt
99
+
100
+ ./assets/pretrained
101
+
102
+ ./assets/uvr5_weights
103
+
104
+ V2 sürümü modelini test etmek isterseniz, ek özellikler indirmeniz gerekecektir.
105
+
106
+ ./assets/pretrained_v2
107
+
108
+ V2 sürüm modelini test etmek isterseniz (v2 sürüm modeli, 9 katmanlı Hubert+final_proj'ün 256 boyutlu özelliğini 12 katmanlı Hubert'ün 768 boyutlu özelliğiyle değiştirmiştir ve 3 periyot ayırıcı eklemiştir), ek özellikleri indirmeniz gerekecektir.
109
+
110
+ ./assets/pretrained_v2
111
+
112
+ Eğer Windows kullanıyorsanız, FFmpeg ve FFprobe kurulu değilse bu iki dosyayı da indirmeniz gerekebilir.
113
+ ffmpeg.exe
114
+
115
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe
116
+
117
+ ffprobe.exe
118
+
119
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe
120
+
121
+ En son SOTA RMVPE vokal ton çıkarma algoritmasını kullanmak istiyorsanız, RMVPE ağırlıklarını indirip RVC kök dizinine koymalısınız.
122
+
123
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.pt
124
+
125
+ AMD/Intel grafik kartları kullanıcıları için indirmeniz gereken:
126
+
127
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.onnx
128
+
129
+ ```
130
+
131
+ Intel ARC grafik kartları kullanıcıları Webui'yi başlatmadan önce `source /opt/intel/oneapi/setvars.sh` komutunu çalıştırmalı.
132
+
133
+ Daha sonra bu komutu kullanarak Webui'yi başlatabilirsiniz:
134
+ ```bash
135
+ python infer-web.py
136
+ ```
137
+ Windows veya macOS kullanıyorsanız, `RVC-beta.7z` dosyasını indirip çıkararak `go-web.bat`i kullanarak veya macOS'ta `sh ./run.sh` kullanarak doğrudan RVC'yi kullanabilirsiniz.
138
+
139
+ ## Krediler
140
+ + [ContentVec](https://github.com/auspicious3000/contentvec/)
141
+ + [VITS](https://github.com/jaywalnut310/vits)
142
+ + [HIFIGAN](https://github.com/jik876/hifi-gan)
143
+ + [Gradio](https://github.com/gradio-app/gradio)
144
+ + [FFmpeg](https://github.com/FFmpeg/FFmpeg)
145
+ + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
146
+ + [audio-slicer](https://github.com/openvpi/audio-slicer)
147
+ + [Vokal ton çıkarma:RMVPE](https://github.com/Dream-High/RMVPE)
148
+ + Ön eğitimli model [yxlllc](https://github.com/yxlllc/RMVPE) ve [RVC-Boss](https://github.com/RVC-Boss) tarafından eğitilip test edilmiştir.
149
+
150
+ ## Katkıda Bulunan Herkese Teşekkürler
151
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
152
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
153
+ </a>
154
+ ```