rohanvetale commited on
Commit
a19a290
ยท
1 Parent(s): 5ddfc63

Added whole damn code

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. .github/PULL_REQUEST_TEMPLATE.md +30 -0
  3. .github/workflows/docker.yml +70 -0
  4. .github/workflows/genlocale.yml +33 -0
  5. .github/workflows/pull_format.yml +38 -0
  6. .github/workflows/push_format.yml +56 -0
  7. .github/workflows/unitest.yml +36 -0
  8. .gitignore +23 -0
  9. Dockerfile +29 -0
  10. GUI.py +1410 -0
  11. LICENSE +23 -0
  12. MITๅ่ฎฎๆšจ็›ธๅ…ณๅผ•็”จๅบ“ๅ่ฎฎ +45 -0
  13. Retrieval_based_Voice_Conversion_WebUI.ipynb +403 -0
  14. Retrieval_based_Voice_Conversion_WebUI_v2.ipynb +422 -0
  15. a.png +0 -0
  16. app.py +1441 -0
  17. assets/hubert/.gitignore +2 -0
  18. assets/pretrained/.gitignore +2 -0
  19. assets/pretrained_v2/.gitignore +2 -0
  20. assets/rmvpe/.gitignore +2 -0
  21. assets/uvr5_weights/.gitignore +2 -0
  22. assets/weights/.gitignore +2 -0
  23. audios/somegirl.mp3 +0 -0
  24. audios/someguy.mp3 +0 -0
  25. audios/unachica.mp3 +0 -0
  26. audios/unchico.mp3 +0 -0
  27. configs/config.json +15 -0
  28. configs/config.py +237 -0
  29. configs/v1/32k.json +46 -0
  30. configs/v1/40k.json +46 -0
  31. configs/v1/48k.json +46 -0
  32. configs/v2/32k.json +46 -0
  33. configs/v2/48k.json +46 -0
  34. docker-compose.yml +13 -0
  35. docs/cn/Changelog_CN.md +96 -0
  36. docs/cn/faq.md +108 -0
  37. docs/en/Changelog_EN.md +100 -0
  38. docs/en/README.en.md +155 -0
  39. docs/en/faiss_tips_en.md +102 -0
  40. docs/en/faq_en.md +119 -0
  41. docs/en/training_tips_en.md +65 -0
  42. docs/fr/Changelog_FR.md +102 -0
  43. docs/fr/README.fr.md +146 -0
  44. docs/fr/faiss_tips_fr.md +105 -0
  45. docs/fr/faq_fr.md +169 -0
  46. docs/fr/training_tips_fr.md +65 -0
  47. docs/jp/README.ja.md +109 -0
  48. docs/jp/faiss_tips_ja.md +101 -0
  49. docs/jp/training_tips_ja.md +64 -0
  50. docs/kr/Changelog_KO.md +106 -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 = assets/weights
6
+ weight_uvr5_root = assets/uvr5_weights
7
+ index_root = logs
8
+ rmvpe_root = assets/rmvpe
.github/PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Pull request checklist
2
+
3
+ - [ ] The PR has a proper title. Use [Semantic Commit Messages](https://seesparkbox.com/foundry/semantic_commit_messages). (No more branch-name title please)
4
+ - [ ] Make sure you are requesting the right branch.
5
+ - [ ] Make sure this is ready to be merged into the relevant branch. Please don't create a PR and let it hang for a few days.
6
+ - [ ] Ensure all tests are passing.
7
+ - [ ] Ensure linting is passing.
8
+
9
+ # PR type
10
+
11
+ - Bug fix / new feature / chore
12
+
13
+ # Description
14
+
15
+ - Describe what this pull request is for.
16
+ - What will it affect.
17
+
18
+ # Screenshot
19
+
20
+ - Please include a screenshot if applicable
21
+
22
+ # Localhost url to test on
23
+
24
+ - Please include a url on localhost to test.
25
+
26
+ # Jira Link
27
+
28
+ - Please include a link to the ticket if applicable.
29
+
30
+ [Ticket]()
.github/workflows/docker.yml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Build And Push Docker Image
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ # Sequence of patterns matched against refs/tags
7
+ tags:
8
+ - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ packages: write
15
+ contents: read
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Set time zone
19
+ uses: szenius/[email protected]
20
+ with:
21
+ timezoneLinux: "Asia/Shanghai"
22
+ timezoneMacos: "Asia/Shanghai"
23
+ timezoneWindows: "China Standard Time"
24
+
25
+ # # ๅฆ‚ๆžœๆœ‰ dockerhub ่ดฆๆˆท๏ผŒๅฏไปฅๅœจgithub็š„secretsไธญ้…็ฝฎไธ‹้ขไธคไธช๏ผŒ็„ถๅŽๅ–ๆถˆไธ‹้ขๆณจ้‡Š็š„่ฟ™ๅ‡ ่กŒ๏ผŒๅนถๅœจmetaๆญฅ้ชค็š„imagesๅขžๅŠ ไธ€่กŒ ${{ github.repository }}
26
+ # - name: Login to DockerHub
27
+ # uses: docker/login-action@v1
28
+ # with:
29
+ # username: ${{ secrets.DOCKERHUB_USERNAME }}
30
+ # password: ${{ secrets.DOCKERHUB_TOKEN }}
31
+
32
+ - name: Login to GHCR
33
+ uses: docker/login-action@v2
34
+ with:
35
+ registry: ghcr.io
36
+ username: ${{ github.repository_owner }}
37
+ password: ${{ secrets.GITHUB_TOKEN }}
38
+
39
+ - name: Extract metadata (tags, labels) for Docker
40
+ id: meta
41
+ uses: docker/metadata-action@v4
42
+ with:
43
+ images: |
44
+ ghcr.io/${{ github.repository }}
45
+ # generate Docker tags based on the following events/attributes
46
+ # nightly, master, pr-2, 1.2.3, 1.2, 1
47
+ tags: |
48
+ type=schedule,pattern=nightly
49
+ type=edge
50
+ type=ref,event=branch
51
+ type=ref,event=pr
52
+ type=semver,pattern={{version}}
53
+ type=semver,pattern={{major}}.{{minor}}
54
+ type=semver,pattern={{major}}
55
+
56
+ - name: Set up QEMU
57
+ uses: docker/setup-qemu-action@v2
58
+
59
+ - name: Set up Docker Buildx
60
+ uses: docker/setup-buildx-action@v2
61
+
62
+ - name: Build and push
63
+ id: docker_build
64
+ uses: docker/build-push-action@v4
65
+ with:
66
+ context: .
67
+ platforms: linux/amd64,linux/arm64
68
+ push: true
69
+ tags: ${{ steps.meta.outputs.tags }}
70
+ labels: ${{ steps.meta.outputs.labels }}
.github/workflows/genlocale.yml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: genlocale
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ genlocale:
8
+ name: genlocale
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Check out
12
+ uses: actions/checkout@master
13
+
14
+ - name: Run locale generation
15
+ run: |
16
+ python3 i18n/scan_i18n.py
17
+ cd i18n
18
+ python3 locale_diff.py
19
+
20
+ - name: Commit back
21
+ if: ${{ !github.head_ref }}
22
+ continue-on-error: true
23
+ run: |
24
+ git config --local user.name 'github-actions[bot]'
25
+ git config --local user.email 'github-actions[bot]@users.noreply.github.com'
26
+ git add --all
27
+ git commit -m "๐ŸŽจ ๅŒๆญฅ locale"
28
+
29
+ - name: Create Pull Request
30
+ if: ${{ !github.head_ref }}
31
+ continue-on-error: true
32
+ uses: peter-evans/create-pull-request@v4
33
+
.github/workflows/pull_format.yml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: pull format
2
+
3
+ on: [pull_request]
4
+
5
+ permissions:
6
+ contents: write
7
+
8
+ jobs:
9
+ pull_format:
10
+ runs-on: ${{ matrix.os }}
11
+
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10"]
15
+ os: [ubuntu-latest]
16
+ fail-fast: false
17
+
18
+ continue-on-error: true
19
+
20
+ steps:
21
+ - name: checkout
22
+ continue-on-error: true
23
+ uses: actions/checkout@v3
24
+ with:
25
+ ref: ${{ github.head_ref }}
26
+ fetch-depth: 0
27
+
28
+ - name: Set up Python ${{ matrix.python-version }}
29
+ uses: actions/setup-python@v4
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+
33
+ - name: Install Black
34
+ run: pip install "black[jupyter]"
35
+
36
+ - name: Run Black
37
+ # run: black $(git ls-files '*.py')
38
+ run: black .
.github/workflows/push_format.yml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: push format
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ push_format:
14
+ runs-on: ${{ matrix.os }}
15
+
16
+ strategy:
17
+ matrix:
18
+ python-version: ["3.10"]
19
+ os: [ubuntu-latest]
20
+ fail-fast: false
21
+
22
+ steps:
23
+ - uses: actions/checkout@v3
24
+ with:
25
+ ref: ${{github.ref_name}}
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - name: Install Black
33
+ run: pip install "black[jupyter]"
34
+
35
+ - name: Run Black
36
+ # run: black $(git ls-files '*.py')
37
+ run: black .
38
+
39
+ - name: Commit Back
40
+ continue-on-error: true
41
+ id: commitback
42
+ run: |
43
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
44
+ git config --local user.name "github-actions[bot]"
45
+ git add --all
46
+ git commit -m "Format code"
47
+
48
+ - name: Create Pull Request
49
+ if: steps.commitback.outcome == 'success'
50
+ continue-on-error: true
51
+ uses: peter-evans/create-pull-request@v5
52
+ with:
53
+ delete-branch: true
54
+ body: Apply Code Formatter Change
55
+ title: Apply Code Formatter Change
56
+ commit-message: Automatic code format
.github/workflows/unitest.yml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: unitest
2
+ on: [ push, pull_request ]
3
+ jobs:
4
+ build:
5
+ runs-on: ${{ matrix.os }}
6
+ strategy:
7
+ matrix:
8
+ python-version: ["3.8", "3.9", "3.10"]
9
+ os: [ubuntu-latest]
10
+ fail-fast: false
11
+
12
+ steps:
13
+ - uses: actions/checkout@master
14
+ - name: Set up Python ${{ matrix.python-version }}
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+ - name: Install dependencies
19
+ run: |
20
+ sudo apt update
21
+ sudo apt -y install ffmpeg
22
+ sudo apt -y install -qq aria2
23
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d ./ -o hubert_base.pt
24
+ python -m pip install --upgrade pip
25
+ python -m pip install --upgrade setuptools
26
+ python -m pip install --upgrade wheel
27
+ pip install torch torchvision torchaudio
28
+ pip install -r requirements.txt
29
+ - name: Test step 1 & 2
30
+ run: |
31
+ mkdir -p logs/mi-test
32
+ touch logs/mi-test/preprocess.log
33
+ python infer/modules/train/preprocess.py logs/mute/0_gt_wavs 48000 8 logs/mi-test True 3.7
34
+ touch logs/mi-test/extract_f0_feature.log
35
+ python infer/modules/train/extract/extract_f0_print.py logs/mi-test $(nproc) pm
36
+ python infer/modules/train/extract_feature_print.py cpu 1 0 0 logs/mi-test v1
.gitignore ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ FROM python:3.10-bullseye
4
+
5
+ EXPOSE 7865
6
+
7
+ WORKDIR /app
8
+
9
+ COPY . .
10
+
11
+ RUN apt update && apt install -y -qq ffmpeg aria2 && apt clean
12
+
13
+ RUN pip3 install --no-cache-dir -r requirements.txt
14
+
15
+ 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
16
+ 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
17
+ 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
18
+ 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
19
+
20
+ 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
21
+ 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
22
+
23
+ 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
24
+
25
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt -d assets/hubert -o rmvpe.pt
26
+
27
+ VOLUME [ "/app/weights", "/app/opt" ]
28
+
29
+ CMD ["python3", "infer-web.py"]
GUI.py ADDED
@@ -0,0 +1,1410 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os, sys
2
+ import datetime, subprocess
3
+ from mega import Mega
4
+ now_dir = os.getcwd()
5
+ sys.path.append(now_dir)
6
+ import logging
7
+ import shutil
8
+ import threading
9
+ import traceback
10
+ import warnings
11
+ from random import shuffle
12
+ from subprocess import Popen
13
+ from time import sleep
14
+ import json
15
+ import pathlib
16
+
17
+ import fairseq
18
+ import faiss
19
+ import gradio as gr
20
+ import numpy as np
21
+ import torch
22
+ from dotenv import load_dotenv
23
+ from sklearn.cluster import MiniBatchKMeans
24
+
25
+ from configs.config import Config
26
+ from i18n.i18n import I18nAuto
27
+ from infer.lib.train.process_ckpt import (
28
+ change_info,
29
+ extract_small_model,
30
+ merge,
31
+ show_info,
32
+ )
33
+ from infer.modules.uvr5.modules import uvr
34
+ from infer.modules.vc.modules import VC
35
+ logging.getLogger("numba").setLevel(logging.WARNING)
36
+
37
+ logger = logging.getLogger(__name__)
38
+
39
+ tmp = os.path.join(now_dir, "TEMP")
40
+ shutil.rmtree(tmp, ignore_errors=True)
41
+ shutil.rmtree("%s/runtime/Lib/site-packages/infer_pack" % (now_dir), ignore_errors=True)
42
+ shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True)
43
+ os.makedirs(tmp, exist_ok=True)
44
+ os.makedirs(os.path.join(now_dir, "logs"), exist_ok=True)
45
+ os.makedirs(os.path.join(now_dir, "assets/weights"), exist_ok=True)
46
+ os.environ["TEMP"] = tmp
47
+ warnings.filterwarnings("ignore")
48
+ torch.manual_seed(114514)
49
+
50
+
51
+ load_dotenv()
52
+ config = Config()
53
+ vc = VC(config)
54
+
55
+ if config.dml == True:
56
+
57
+ def forward_dml(ctx, x, scale):
58
+ ctx.scale = scale
59
+ res = x.clone().detach()
60
+ return res
61
+
62
+ fairseq.modules.grad_multiply.GradMultiply.forward = forward_dml
63
+ i18n = I18nAuto()
64
+ logger.info(i18n)
65
+ # ๅˆคๆ–ญๆ˜ฏๅฆๆœ‰่ƒฝ็”จๆฅ่ฎญ็ปƒๅ’ŒๅŠ ้€ŸๆŽจ็†็š„Nๅก
66
+ ngpu = torch.cuda.device_count()
67
+ gpu_infos = []
68
+ mem = []
69
+ if_gpu_ok = False
70
+
71
+ if torch.cuda.is_available() or ngpu != 0:
72
+ for i in range(ngpu):
73
+ gpu_name = torch.cuda.get_device_name(i)
74
+ if any(
75
+ value in gpu_name.upper()
76
+ for value in [
77
+ "10",
78
+ "16",
79
+ "20",
80
+ "30",
81
+ "40",
82
+ "A2",
83
+ "A3",
84
+ "A4",
85
+ "P4",
86
+ "A50",
87
+ "500",
88
+ "A60",
89
+ "70",
90
+ "80",
91
+ "90",
92
+ "M4",
93
+ "T4",
94
+ "TITAN",
95
+ ]
96
+ ):
97
+ # A10#A100#V100#A40#P40#M40#K80#A4500
98
+ if_gpu_ok = True # ่‡ณๅฐ‘ๆœ‰ไธ€ๅผ ่ƒฝ็”จ็š„Nๅก
99
+ gpu_infos.append("%s\t%s" % (i, gpu_name))
100
+ mem.append(
101
+ int(
102
+ torch.cuda.get_device_properties(i).total_memory
103
+ / 1024
104
+ / 1024
105
+ / 1024
106
+ + 0.4
107
+ )
108
+ )
109
+ if if_gpu_ok and len(gpu_infos) > 0:
110
+ gpu_info = "\n".join(gpu_infos)
111
+ default_batch_size = min(mem) // 2
112
+ else:
113
+ gpu_info = i18n("ๅพˆ้—ๆ†พๆ‚จ่ฟ™ๆฒกๆœ‰่ƒฝ็”จ็š„ๆ˜พๅกๆฅๆ”ฏๆŒๆ‚จ่ฎญ็ปƒ")
114
+ default_batch_size = 1
115
+ gpus = "-".join([i[0] for i in gpu_infos])
116
+
117
+
118
+ class ToolButton(gr.Button, gr.components.FormComponent):
119
+ """Small button with single emoji as text, fits inside gradio forms"""
120
+
121
+ def __init__(self, **kwargs):
122
+ super().__init__(variant="tool", **kwargs)
123
+
124
+ def get_block_name(self):
125
+ return "button"
126
+
127
+
128
+ weight_root = os.getenv("weight_root")
129
+ weight_uvr5_root = os.getenv("weight_uvr5_root")
130
+ index_root = os.getenv("index_root")
131
+
132
+ names = []
133
+ for name in os.listdir(weight_root):
134
+ if name.endswith(".pth"):
135
+ names.append(name)
136
+ index_paths = []
137
+ for root, dirs, files in os.walk(index_root, topdown=False):
138
+ for name in files:
139
+ if name.endswith(".index") and "trained" not in name:
140
+ index_paths.append("%s/%s" % (root, name))
141
+ uvr5_names = []
142
+ for name in os.listdir(weight_uvr5_root):
143
+ if name.endswith(".pth") or "onnx" in name:
144
+ uvr5_names.append(name.replace(".pth", ""))
145
+
146
+
147
+ def change_choices():
148
+ names = []
149
+ for name in os.listdir(weight_root):
150
+ if name.endswith(".pth"):
151
+ names.append(name)
152
+ index_paths = []
153
+ for root, dirs, files in os.walk(index_root, topdown=False):
154
+ for name in files:
155
+ if name.endswith(".index") and "trained" not in name:
156
+ index_paths.append("%s/%s" % (root, name))
157
+ audio_files=[]
158
+ for filename in os.listdir("./audios"):
159
+ if filename.endswith(('.wav','.mp3','.ogg')):
160
+ audio_files.append('./audios/'+filename)
161
+ return {"choices": sorted(names), "__type__": "update"}, {
162
+ "choices": sorted(index_paths),
163
+ "__type__": "update",
164
+ }, {"choices": sorted(audio_files), "__type__": "update"}
165
+
166
+ def clean():
167
+ return {"value": "", "__type__": "update"}
168
+
169
+
170
+ def export_onnx():
171
+ from infer.modules.onnx.export import export_onnx as eo
172
+
173
+ eo()
174
+
175
+
176
+ sr_dict = {
177
+ "32k": 32000,
178
+ "40k": 40000,
179
+ "48k": 48000,
180
+ }
181
+
182
+
183
+ def if_done(done, p):
184
+ while 1:
185
+ if p.poll() is None:
186
+ sleep(0.5)
187
+ else:
188
+ break
189
+ done[0] = True
190
+
191
+
192
+ def if_done_multi(done, ps):
193
+ while 1:
194
+ # poll==Noneไปฃ่กจ่ฟ›็จ‹ๆœช็ป“ๆŸ
195
+ # ๅช่ฆๆœ‰ไธ€ไธช่ฟ›็จ‹ๆœช็ป“ๆŸ้ƒฝไธๅœ
196
+ flag = 1
197
+ for p in ps:
198
+ if p.poll() is None:
199
+ flag = 0
200
+ sleep(0.5)
201
+ break
202
+ if flag == 1:
203
+ break
204
+ done[0] = True
205
+
206
+
207
+ def preprocess_dataset(trainset_dir, exp_dir, sr, n_p):
208
+ sr = sr_dict[sr]
209
+ os.makedirs("%s/logs/%s" % (now_dir, exp_dir), exist_ok=True)
210
+ f = open("%s/logs/%s/preprocess.log" % (now_dir, exp_dir), "w")
211
+ f.close()
212
+ per = 3.0 if config.is_half else 3.7
213
+ cmd = '"%s" infer/modules/train/preprocess.py "%s" %s %s "%s/logs/%s" %s %.1f' % (
214
+ config.python_cmd,
215
+ trainset_dir,
216
+ sr,
217
+ n_p,
218
+ now_dir,
219
+ exp_dir,
220
+ config.noparallel,
221
+ per,
222
+ )
223
+ logger.info(cmd)
224
+ p = Popen(cmd, shell=True) # , stdin=PIPE, stdout=PIPE,stderr=PIPE,cwd=now_dir
225
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
226
+ done = [False]
227
+ threading.Thread(
228
+ target=if_done,
229
+ args=(
230
+ done,
231
+ p,
232
+ ),
233
+ ).start()
234
+ while 1:
235
+ with open("%s/logs/%s/preprocess.log" % (now_dir, exp_dir), "r") as f:
236
+ yield (f.read())
237
+ sleep(1)
238
+ if done[0]:
239
+ break
240
+ with open("%s/logs/%s/preprocess.log" % (now_dir, exp_dir), "r") as f:
241
+ log = f.read()
242
+ logger.info(log)
243
+ yield log
244
+
245
+
246
+ # but2.click(extract_f0,[gpus6,np7,f0method8,if_f0_3,trainset_dir4],[info2])
247
+ def extract_f0_feature(gpus, n_p, f0method, if_f0, exp_dir, version19, gpus_rmvpe):
248
+ gpus = gpus.split("-")
249
+ os.makedirs("%s/logs/%s" % (now_dir, exp_dir), exist_ok=True)
250
+ f = open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "w")
251
+ f.close()
252
+ if if_f0:
253
+ if f0method != "rmvpe_gpu":
254
+ cmd = (
255
+ '"%s" infer/modules/train/extract/extract_f0_print.py "%s/logs/%s" %s %s'
256
+ % (
257
+ config.python_cmd,
258
+ now_dir,
259
+ exp_dir,
260
+ n_p,
261
+ f0method,
262
+ )
263
+ )
264
+ logger.info(cmd)
265
+ p = Popen(
266
+ cmd, shell=True, cwd=now_dir
267
+ ) # , stdin=PIPE, stdout=PIPE,stderr=PIPE
268
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
269
+ done = [False]
270
+ threading.Thread(
271
+ target=if_done,
272
+ args=(
273
+ done,
274
+ p,
275
+ ),
276
+ ).start()
277
+ else:
278
+ if gpus_rmvpe != "-":
279
+ gpus_rmvpe = gpus_rmvpe.split("-")
280
+ leng = len(gpus_rmvpe)
281
+ ps = []
282
+ for idx, n_g in enumerate(gpus_rmvpe):
283
+ cmd = (
284
+ '"%s" infer/modules/train/extract/extract_f0_rmvpe.py %s %s %s "%s/logs/%s" %s '
285
+ % (
286
+ config.python_cmd,
287
+ leng,
288
+ idx,
289
+ n_g,
290
+ now_dir,
291
+ exp_dir,
292
+ config.is_half,
293
+ )
294
+ )
295
+ logger.info(cmd)
296
+ p = Popen(
297
+ cmd, shell=True, cwd=now_dir
298
+ ) # , shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=now_dir
299
+ ps.append(p)
300
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
301
+ done = [False]
302
+ threading.Thread(
303
+ target=if_done_multi, #
304
+ args=(
305
+ done,
306
+ ps,
307
+ ),
308
+ ).start()
309
+ else:
310
+ cmd = (
311
+ config.python_cmd
312
+ + ' infer/modules/train/extract/extract_f0_rmvpe_dml.py "%s/logs/%s" '
313
+ % (
314
+ now_dir,
315
+ exp_dir,
316
+ )
317
+ )
318
+ logger.info(cmd)
319
+ p = Popen(
320
+ cmd, shell=True, cwd=now_dir
321
+ ) # , shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=now_dir
322
+ p.wait()
323
+ done = [True]
324
+ while 1:
325
+ with open(
326
+ "%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r"
327
+ ) as f:
328
+ yield (f.read())
329
+ sleep(1)
330
+ if done[0]:
331
+ break
332
+ with open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r") as f:
333
+ log = f.read()
334
+ logger.info(log)
335
+ yield log
336
+ ####ๅฏนไธๅŒpartๅˆ†ๅˆซๅผ€ๅคš่ฟ›็จ‹
337
+ """
338
+ n_part=int(sys.argv[1])
339
+ i_part=int(sys.argv[2])
340
+ i_gpu=sys.argv[3]
341
+ exp_dir=sys.argv[4]
342
+ os.environ["CUDA_VISIBLE_DEVICES"]=str(i_gpu)
343
+ """
344
+ leng = len(gpus)
345
+ ps = []
346
+ for idx, n_g in enumerate(gpus):
347
+ cmd = (
348
+ '"%s" infer/modules/train/extract_feature_print.py %s %s %s %s "%s/logs/%s" %s'
349
+ % (
350
+ config.python_cmd,
351
+ config.device,
352
+ leng,
353
+ idx,
354
+ n_g,
355
+ now_dir,
356
+ exp_dir,
357
+ version19,
358
+ )
359
+ )
360
+ logger.info(cmd)
361
+ p = Popen(
362
+ cmd, shell=True, cwd=now_dir
363
+ ) # , shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=now_dir
364
+ ps.append(p)
365
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
366
+ done = [False]
367
+ threading.Thread(
368
+ target=if_done_multi,
369
+ args=(
370
+ done,
371
+ ps,
372
+ ),
373
+ ).start()
374
+ while 1:
375
+ with open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r") as f:
376
+ yield (f.read())
377
+ sleep(1)
378
+ if done[0]:
379
+ break
380
+ with open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r") as f:
381
+ log = f.read()
382
+ logger.info(log)
383
+ yield log
384
+
385
+
386
+ def get_pretrained_models(path_str, f0_str, sr2):
387
+ if_pretrained_generator_exist = os.access(
388
+ "assets/pretrained%s/%sG%s.pth" % (path_str, f0_str, sr2), os.F_OK
389
+ )
390
+ if_pretrained_discriminator_exist = os.access(
391
+ "assets/pretrained%s/%sD%s.pth" % (path_str, f0_str, sr2), os.F_OK
392
+ )
393
+ if not if_pretrained_generator_exist:
394
+ logger.warn(
395
+ "assets/pretrained%s/%sG%s.pth not exist, will not use pretrained model",
396
+ path_str,
397
+ f0_str,
398
+ sr2,
399
+ )
400
+ if not if_pretrained_discriminator_exist:
401
+ logger.warn(
402
+ "assets/pretrained%s/%sD%s.pth not exist, will not use pretrained model",
403
+ path_str,
404
+ f0_str,
405
+ sr2,
406
+ )
407
+ return (
408
+ "assets/pretrained%s/%sG%s.pth" % (path_str, f0_str, sr2)
409
+ if if_pretrained_generator_exist
410
+ else "",
411
+ "assets/pretrained%s/%sD%s.pth" % (path_str, f0_str, sr2)
412
+ if if_pretrained_discriminator_exist
413
+ else "",
414
+ )
415
+
416
+
417
+ def change_sr2(sr2, if_f0_3, version19):
418
+ path_str = "" if version19 == "v1" else "_v2"
419
+ f0_str = "f0" if if_f0_3 else ""
420
+ return get_pretrained_models(path_str, f0_str, sr2)
421
+
422
+
423
+ def change_version19(sr2, if_f0_3, version19):
424
+ path_str = "" if version19 == "v1" else "_v2"
425
+ if sr2 == "32k" and version19 == "v1":
426
+ sr2 = "40k"
427
+ to_return_sr2 = (
428
+ {"choices": ["40k", "48k"], "__type__": "update", "value": sr2}
429
+ if version19 == "v1"
430
+ else {"choices": ["40k", "48k", "32k"], "__type__": "update", "value": sr2}
431
+ )
432
+ f0_str = "f0" if if_f0_3 else ""
433
+ return (
434
+ *get_pretrained_models(path_str, f0_str, sr2),
435
+ to_return_sr2,
436
+ )
437
+
438
+
439
+ def change_f0(if_f0_3, sr2, version19): # f0method8,pretrained_G14,pretrained_D15
440
+ path_str = "" if version19 == "v1" else "_v2"
441
+ return (
442
+ {"visible": if_f0_3, "__type__": "update"},
443
+ *get_pretrained_models(path_str, "f0", sr2),
444
+ )
445
+
446
+
447
+ # but3.click(click_train,[exp_dir1,sr2,if_f0_3,save_epoch10,total_epoch11,batch_size12,if_save_latest13,pretrained_G14,pretrained_D15,gpus16])
448
+ def click_train(
449
+ exp_dir1,
450
+ sr2,
451
+ if_f0_3,
452
+ spk_id5,
453
+ save_epoch10,
454
+ total_epoch11,
455
+ batch_size12,
456
+ if_save_latest13,
457
+ pretrained_G14,
458
+ pretrained_D15,
459
+ gpus16,
460
+ if_cache_gpu17,
461
+ if_save_every_weights18,
462
+ version19,
463
+ ):
464
+ # ็”Ÿๆˆfilelist
465
+ exp_dir = "%s/logs/%s" % (now_dir, exp_dir1)
466
+ os.makedirs(exp_dir, exist_ok=True)
467
+ gt_wavs_dir = "%s/0_gt_wavs" % (exp_dir)
468
+ feature_dir = (
469
+ "%s/3_feature256" % (exp_dir)
470
+ if version19 == "v1"
471
+ else "%s/3_feature768" % (exp_dir)
472
+ )
473
+ if if_f0_3:
474
+ f0_dir = "%s/2a_f0" % (exp_dir)
475
+ f0nsf_dir = "%s/2b-f0nsf" % (exp_dir)
476
+ names = (
477
+ set([name.split(".")[0] for name in os.listdir(gt_wavs_dir)])
478
+ & set([name.split(".")[0] for name in os.listdir(feature_dir)])
479
+ & set([name.split(".")[0] for name in os.listdir(f0_dir)])
480
+ & set([name.split(".")[0] for name in os.listdir(f0nsf_dir)])
481
+ )
482
+ else:
483
+ names = set([name.split(".")[0] for name in os.listdir(gt_wavs_dir)]) & set(
484
+ [name.split(".")[0] for name in os.listdir(feature_dir)]
485
+ )
486
+ opt = []
487
+ for name in names:
488
+ if if_f0_3:
489
+ opt.append(
490
+ "%s/%s.wav|%s/%s.npy|%s/%s.wav.npy|%s/%s.wav.npy|%s"
491
+ % (
492
+ gt_wavs_dir.replace("\\", "\\\\"),
493
+ name,
494
+ feature_dir.replace("\\", "\\\\"),
495
+ name,
496
+ f0_dir.replace("\\", "\\\\"),
497
+ name,
498
+ f0nsf_dir.replace("\\", "\\\\"),
499
+ name,
500
+ spk_id5,
501
+ )
502
+ )
503
+ else:
504
+ opt.append(
505
+ "%s/%s.wav|%s/%s.npy|%s"
506
+ % (
507
+ gt_wavs_dir.replace("\\", "\\\\"),
508
+ name,
509
+ feature_dir.replace("\\", "\\\\"),
510
+ name,
511
+ spk_id5,
512
+ )
513
+ )
514
+ fea_dim = 256 if version19 == "v1" else 768
515
+ if if_f0_3:
516
+ for _ in range(2):
517
+ opt.append(
518
+ "%s/logs/mute/0_gt_wavs/mute%s.wav|%s/logs/mute/3_feature%s/mute.npy|%s/logs/mute/2a_f0/mute.wav.npy|%s/logs/mute/2b-f0nsf/mute.wav.npy|%s"
519
+ % (now_dir, sr2, now_dir, fea_dim, now_dir, now_dir, spk_id5)
520
+ )
521
+ else:
522
+ for _ in range(2):
523
+ opt.append(
524
+ "%s/logs/mute/0_gt_wavs/mute%s.wav|%s/logs/mute/3_feature%s/mute.npy|%s"
525
+ % (now_dir, sr2, now_dir, fea_dim, spk_id5)
526
+ )
527
+ shuffle(opt)
528
+ with open("%s/filelist.txt" % exp_dir, "w") as f:
529
+ f.write("\n".join(opt))
530
+ logger.debug("Write filelist done")
531
+ # ็”Ÿๆˆconfig#ๆ— ้œ€็”Ÿๆˆconfig
532
+ # cmd = python_cmd + " train_nsf_sim_cache_sid_load_pretrain.py -e mi-test -sr 40k -f0 1 -bs 4 -g 0 -te 10 -se 5 -pg pretrained/f0G40k.pth -pd pretrained/f0D40k.pth -l 1 -c 0"
533
+ logger.info("Use gpus: %s", str(gpus16))
534
+ if pretrained_G14 == "":
535
+ logger.info("No pretrained Generator")
536
+ if pretrained_D15 == "":
537
+ logger.info("No pretrained Discriminator")
538
+ if version19 == "v1" or sr2 == "40k":
539
+ config_path = "v1/%s.json" % sr2
540
+ else:
541
+ config_path = "v2/%s.json" % sr2
542
+ config_save_path = os.path.join(exp_dir, "config.json")
543
+ if not pathlib.Path(config_save_path).exists():
544
+ with open(config_save_path, "w", encoding="utf-8") as f:
545
+ json.dump(
546
+ config.json_config[config_path],
547
+ f,
548
+ ensure_ascii=False,
549
+ indent=4,
550
+ sort_keys=True,
551
+ )
552
+ f.write("\n")
553
+ if gpus16:
554
+ cmd = (
555
+ '"%s" infer/modules/train/train.py -e "%s" -sr %s -f0 %s -bs %s -g %s -te %s -se %s %s %s -l %s -c %s -sw %s -v %s'
556
+ % (
557
+ config.python_cmd,
558
+ exp_dir1,
559
+ sr2,
560
+ 1 if if_f0_3 else 0,
561
+ batch_size12,
562
+ gpus16,
563
+ total_epoch11,
564
+ save_epoch10,
565
+ "-pg %s" % pretrained_G14 if pretrained_G14 != "" else "",
566
+ "-pd %s" % pretrained_D15 if pretrained_D15 != "" else "",
567
+ 1 if if_save_latest13 == i18n("ๆ˜ฏ") else 0,
568
+ 1 if if_cache_gpu17 == i18n("ๆ˜ฏ") else 0,
569
+ 1 if if_save_every_weights18 == i18n("ๆ˜ฏ") else 0,
570
+ version19,
571
+ )
572
+ )
573
+ else:
574
+ cmd = (
575
+ '"%s" infer/modules/train/train.py -e "%s" -sr %s -f0 %s -bs %s -te %s -se %s %s %s -l %s -c %s -sw %s -v %s'
576
+ % (
577
+ config.python_cmd,
578
+ exp_dir1,
579
+ sr2,
580
+ 1 if if_f0_3 else 0,
581
+ batch_size12,
582
+ total_epoch11,
583
+ save_epoch10,
584
+ "-pg %s" % pretrained_G14 if pretrained_G14 != "" else "",
585
+ "-pd %s" % pretrained_D15 if pretrained_D15 != "" else "",
586
+ 1 if if_save_latest13 == i18n("ๆ˜ฏ") else 0,
587
+ 1 if if_cache_gpu17 == i18n("ๆ˜ฏ") else 0,
588
+ 1 if if_save_every_weights18 == i18n("ๆ˜ฏ") else 0,
589
+ version19,
590
+ )
591
+ )
592
+ logger.info(cmd)
593
+ p = Popen(cmd, shell=True, cwd=now_dir)
594
+ p.wait()
595
+ return "่ฎญ็ปƒ็ป“ๆŸ, ๆ‚จๅฏๆŸฅ็œ‹ๆŽงๅˆถๅฐ่ฎญ็ปƒๆ—ฅๅฟ—ๆˆ–ๅฎž้ชŒๆ–‡ไปถๅคนไธ‹็š„train.log"
596
+
597
+
598
+ # but4.click(train_index, [exp_dir1], info3)
599
+ def train_index(exp_dir1, version19):
600
+ # exp_dir = "%s/logs/%s" % (now_dir, exp_dir1)
601
+ exp_dir = "logs/%s" % (exp_dir1)
602
+ os.makedirs(exp_dir, exist_ok=True)
603
+ feature_dir = (
604
+ "%s/3_feature256" % (exp_dir)
605
+ if version19 == "v1"
606
+ else "%s/3_feature768" % (exp_dir)
607
+ )
608
+ if not os.path.exists(feature_dir):
609
+ return "่ฏทๅ…ˆ่ฟ›่กŒ็‰นๅพๆๅ–!"
610
+ listdir_res = list(os.listdir(feature_dir))
611
+ if len(listdir_res) == 0:
612
+ return "่ฏทๅ…ˆ่ฟ›่กŒ็‰นๅพๆๅ–๏ผ"
613
+ infos = []
614
+ npys = []
615
+ for name in sorted(listdir_res):
616
+ phone = np.load("%s/%s" % (feature_dir, name))
617
+ npys.append(phone)
618
+ big_npy = np.concatenate(npys, 0)
619
+ big_npy_idx = np.arange(big_npy.shape[0])
620
+ np.random.shuffle(big_npy_idx)
621
+ big_npy = big_npy[big_npy_idx]
622
+ if big_npy.shape[0] > 2e5:
623
+ infos.append("Trying doing kmeans %s shape to 10k centers." % big_npy.shape[0])
624
+ yield "\n".join(infos)
625
+ try:
626
+ big_npy = (
627
+ MiniBatchKMeans(
628
+ n_clusters=10000,
629
+ verbose=True,
630
+ batch_size=256 * config.n_cpu,
631
+ compute_labels=False,
632
+ init="random",
633
+ )
634
+ .fit(big_npy)
635
+ .cluster_centers_
636
+ )
637
+ except:
638
+ info = traceback.format_exc()
639
+ logger.info(info)
640
+ infos.append(info)
641
+ yield "\n".join(infos)
642
+
643
+ np.save("%s/total_fea.npy" % exp_dir, big_npy)
644
+ n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
645
+ infos.append("%s,%s" % (big_npy.shape, n_ivf))
646
+ yield "\n".join(infos)
647
+ index = faiss.index_factory(256 if version19 == "v1" else 768, "IVF%s,Flat" % n_ivf)
648
+ # index = faiss.index_factory(256if version19=="v1"else 768, "IVF%s,PQ128x4fs,RFlat"%n_ivf)
649
+ infos.append("training")
650
+ yield "\n".join(infos)
651
+ index_ivf = faiss.extract_index_ivf(index) #
652
+ index_ivf.nprobe = 1
653
+ index.train(big_npy)
654
+ faiss.write_index(
655
+ index,
656
+ "%s/trained_IVF%s_Flat_nprobe_%s_%s_%s.index"
657
+ % (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
658
+ )
659
+
660
+ infos.append("adding")
661
+ yield "\n".join(infos)
662
+ batch_size_add = 8192
663
+ for i in range(0, big_npy.shape[0], batch_size_add):
664
+ index.add(big_npy[i : i + batch_size_add])
665
+ faiss.write_index(
666
+ index,
667
+ "%s/added_IVF%s_Flat_nprobe_%s_%s_%s.index"
668
+ % (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
669
+ )
670
+ infos.append(
671
+ "ๆˆๅŠŸๆž„ๅปบ็ดขๅผ•๏ผŒadded_IVF%s_Flat_nprobe_%s_%s_%s.index"
672
+ % (n_ivf, index_ivf.nprobe, exp_dir1, version19)
673
+ )
674
+ # faiss.write_index(index, '%s/added_IVF%s_Flat_FastScan_%s.index'%(exp_dir,n_ivf,version19))
675
+ # infos.append("ๆˆๅŠŸๆž„ๅปบ็ดขๅผ•๏ผŒadded_IVF%s_Flat_FastScan_%s.index"%(n_ivf,version19))
676
+ yield "\n".join(infos)
677
+
678
+
679
+ # but5.click(train1key, [exp_dir1, sr2, if_f0_3, trainset_dir4, spk_id5, gpus6, np7, f0method8, save_epoch10, total_epoch11, batch_size12, if_save_latest13, pretrained_G14, pretrained_D15, gpus16, if_cache_gpu17], info3)
680
+ def train1key(
681
+ exp_dir1,
682
+ sr2,
683
+ if_f0_3,
684
+ trainset_dir4,
685
+ spk_id5,
686
+ np7,
687
+ f0method8,
688
+ save_epoch10,
689
+ total_epoch11,
690
+ batch_size12,
691
+ if_save_latest13,
692
+ pretrained_G14,
693
+ pretrained_D15,
694
+ gpus16,
695
+ if_cache_gpu17,
696
+ if_save_every_weights18,
697
+ version19,
698
+ gpus_rmvpe,
699
+ ):
700
+ infos = []
701
+
702
+ def get_info_str(strr):
703
+ infos.append(strr)
704
+ return "\n".join(infos)
705
+
706
+ ####### step1:ๅค„็†ๆ•ฐๆฎ
707
+ yield get_info_str(i18n("step1:ๆญฃๅœจๅค„็†ๆ•ฐๆฎ"))
708
+ [get_info_str(_) for _ in preprocess_dataset(trainset_dir4, exp_dir1, sr2, np7)]
709
+
710
+ ####### step2a:ๆๅ–้Ÿณ้ซ˜
711
+ yield get_info_str(i18n("step2:ๆญฃๅœจๆๅ–้Ÿณ้ซ˜&ๆญฃๅœจๆๅ–็‰นๅพ"))
712
+ [
713
+ get_info_str(_)
714
+ for _ in extract_f0_feature(
715
+ gpus16, np7, f0method8, if_f0_3, exp_dir1, version19, gpus_rmvpe
716
+ )
717
+ ]
718
+
719
+ ####### step3a:่ฎญ็ปƒๆจกๅž‹
720
+ yield get_info_str(i18n("step3a:ๆญฃๅœจ่ฎญ็ปƒๆจกๅž‹"))
721
+ click_train(
722
+ exp_dir1,
723
+ sr2,
724
+ if_f0_3,
725
+ spk_id5,
726
+ save_epoch10,
727
+ total_epoch11,
728
+ batch_size12,
729
+ if_save_latest13,
730
+ pretrained_G14,
731
+ pretrained_D15,
732
+ gpus16,
733
+ if_cache_gpu17,
734
+ if_save_every_weights18,
735
+ version19,
736
+ )
737
+ yield get_info_str(i18n("่ฎญ็ปƒ็ป“ๆŸ, ๆ‚จๅฏๆŸฅ็œ‹ๆŽงๅˆถๅฐ่ฎญ็ปƒๆ—ฅๅฟ—ๆˆ–ๅฎž้ชŒๆ–‡ไปถๅคนไธ‹็š„train.log"))
738
+
739
+ ####### step3b:่ฎญ็ปƒ็ดขๅผ•
740
+ [get_info_str(_) for _ in train_index(exp_dir1, version19)]
741
+ yield get_info_str(i18n("ๅ…จๆต็จ‹็ป“ๆŸ๏ผ"))
742
+
743
+
744
+ # ckpt_path2.change(change_info_,[ckpt_path2],[sr__,if_f0__])
745
+ def change_info_(ckpt_path):
746
+ if not os.path.exists(ckpt_path.replace(os.path.basename(ckpt_path), "train.log")):
747
+ return {"__type__": "update"}, {"__type__": "update"}, {"__type__": "update"}
748
+ try:
749
+ with open(
750
+ ckpt_path.replace(os.path.basename(ckpt_path), "train.log"), "r"
751
+ ) as f:
752
+ info = eval(f.read().strip("\n").split("\n")[0].split("\t")[-1])
753
+ sr, f0 = info["sample_rate"], info["if_f0"]
754
+ version = "v2" if ("version" in info and info["version"] == "v2") else "v1"
755
+ return sr, str(f0), version
756
+ except:
757
+ traceback.print_exc()
758
+ return {"__type__": "update"}, {"__type__": "update"}, {"__type__": "update"}
759
+
760
+
761
+ F0GPUVisible = config.dml == False
762
+
763
+
764
+ def change_f0_method(f0method8):
765
+ if f0method8 == "rmvpe_gpu":
766
+ visible = F0GPUVisible
767
+ else:
768
+ visible = False
769
+ return {"visible": visible, "__type__": "update"}
770
+
771
+ def find_model():
772
+ if len(names) > 0:
773
+ vc.get_vc(sorted(names)[0],None,None)
774
+ return sorted(names)[0]
775
+ else:
776
+ try:
777
+ gr.Info("Do not forget to choose a model.")
778
+ except:
779
+ pass
780
+ return ''
781
+
782
+ def find_audios(index=False):
783
+ audio_files=[]
784
+ if not os.path.exists('./audios'): os.mkdir("./audios")
785
+ for filename in os.listdir("./audios"):
786
+ if filename.endswith(('.wav','.mp3','.ogg')):
787
+ audio_files.append("./audios/"+filename)
788
+ if index:
789
+ if len(audio_files) > 0: return sorted(audio_files)[0]
790
+ else: return ""
791
+ elif len(audio_files) > 0: return sorted(audio_files)
792
+ else: return []
793
+
794
+ def get_index():
795
+ if find_model() != '':
796
+ chosen_model=sorted(names)[0].split(".")[0]
797
+ logs_path="./logs/"+chosen_model
798
+ if os.path.exists(logs_path):
799
+ for file in os.listdir(logs_path):
800
+ if file.endswith(".index"):
801
+ return os.path.join(logs_path, file)
802
+ return ''
803
+ else:
804
+ return ''
805
+
806
+ def get_indexes():
807
+ indexes_list=[]
808
+ for dirpath, dirnames, filenames in os.walk("./logs/"):
809
+ for filename in filenames:
810
+ if filename.endswith(".index"):
811
+ indexes_list.append(os.path.join(dirpath,filename))
812
+ if len(indexes_list) > 0:
813
+ return indexes_list
814
+ else:
815
+ return ''
816
+
817
+ def save_wav(file):
818
+ try:
819
+ file_path=file.name
820
+ shutil.move(file_path,'./audios')
821
+ return './audios/'+os.path.basename(file_path)
822
+ except AttributeError:
823
+ try:
824
+ new_name = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")+'.wav'
825
+ new_path='./audios/'+new_name
826
+ shutil.move(file,new_path)
827
+ return new_path
828
+ except TypeError:
829
+ return None
830
+
831
+ def download_from_url(url, model):
832
+ if url == '':
833
+ return "URL cannot be left empty."
834
+ if model =='':
835
+ return "You need to name your model. For example: My-Model"
836
+ url = url.strip()
837
+ zip_dirs = ["zips", "unzips"]
838
+ for directory in zip_dirs:
839
+ if os.path.exists(directory):
840
+ shutil.rmtree(directory)
841
+ os.makedirs("zips", exist_ok=True)
842
+ os.makedirs("unzips", exist_ok=True)
843
+ zipfile = model + '.zip'
844
+ zipfile_path = './zips/' + zipfile
845
+ try:
846
+ if "drive.google.com" in url:
847
+ subprocess.run(["gdown", url, "--fuzzy", "-O", zipfile_path])
848
+ elif "mega.nz" in url:
849
+ m = Mega()
850
+ m.download_url(url, './zips')
851
+ else:
852
+ subprocess.run(["wget", url, "-O", zipfile_path])
853
+ for filename in os.listdir("./zips"):
854
+ if filename.endswith(".zip"):
855
+ zipfile_path = os.path.join("./zips/",filename)
856
+ shutil.unpack_archive(zipfile_path, "./unzips", 'zip')
857
+ else:
858
+ return "No zipfile found."
859
+ for root, dirs, files in os.walk('./unzips'):
860
+ for file in files:
861
+ file_path = os.path.join(root, file)
862
+ if file.endswith(".index"):
863
+ os.mkdir(f'./logs/{model}')
864
+ shutil.copy2(file_path,f'./logs/{model}')
865
+ elif "G_" not in file and "D_" not in file and file.endswith(".pth"):
866
+ shutil.copy(file_path,f'./assets/weights/{model}.pth')
867
+ shutil.rmtree("zips")
868
+ shutil.rmtree("unzips")
869
+ return "Success."
870
+ except:
871
+ return "There's been an error."
872
+
873
+ def upload_to_dataset(files, dir):
874
+ if dir == '':
875
+ dir = './dataset/'+datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
876
+ if not os.path.exists(dir):
877
+ os.makedirs(dir)
878
+ for file in files:
879
+ path=file.name
880
+ shutil.copy2(path,dir)
881
+ try:
882
+ gr.Info(i18n("ๅค„็†ๆ•ฐๆฎ"))
883
+ except:
884
+ pass
885
+ return i18n("ๅค„็†ๆ•ฐๆฎ"), {"value":dir,"__type__":"update"}
886
+
887
+ with gr.Blocks(title="EasyGUI v2.9",theme=gr.themes.Base()) as app:
888
+ gr.HTML("<h1> EasyGUI v2.9 </h1>")
889
+ with gr.Tabs():
890
+ with gr.TabItem(i18n("ๆจกๅž‹ๆŽจ็†")):
891
+ with gr.Row():
892
+ sid0 = gr.Dropdown(label=i18n("ๆŽจ็†้Ÿณ่‰ฒ"), choices=sorted(names), value=find_model())
893
+ refresh_button = gr.Button(i18n("ๅˆทๆ–ฐ้Ÿณ่‰ฒๅˆ—่กจๅ’Œ็ดขๅผ•่ทฏๅพ„"), variant="primary")
894
+ #clean_button = gr.Button(i18n("ๅธ่ฝฝ้Ÿณ่‰ฒ็œๆ˜พๅญ˜"), variant="primary")
895
+ spk_item = gr.Slider(
896
+ minimum=0,
897
+ maximum=2333,
898
+ step=1,
899
+ label=i18n("่ฏท้€‰ๆ‹ฉ่ฏด่ฏไบบid"),
900
+ value=0,
901
+ visible=False,
902
+ interactive=True,
903
+ )
904
+ #clean_button.click(
905
+ # fn=clean, inputs=[], outputs=[sid0], api_name="infer_clean"
906
+ #)
907
+ vc_transform0 = gr.Number(
908
+ label=i18n("ๅ˜่ฐƒ(ๆ•ดๆ•ฐ, ๅŠ้Ÿณๆ•ฐ้‡, ๅ‡ๅ…ซๅบฆ12้™ๅ…ซๅบฆ-12)"), value=0
909
+ )
910
+ but0 = gr.Button(i18n("่ฝฌๆข"), variant="primary")
911
+ with gr.Row():
912
+ with gr.Column():
913
+ with gr.Row():
914
+ dropbox = gr.File(label="Drop your audio here & hit the Reload button.")
915
+ with gr.Row():
916
+ record_button=gr.Audio(source="microphone", label="OR Record audio.", type="filepath")
917
+ with gr.Row():
918
+ input_audio0 = gr.Dropdown(
919
+ label=i18n("่พ“ๅ…ฅๅพ…ๅค„็†้Ÿณ้ข‘ๆ–‡ไปถ่ทฏๅพ„(้ป˜่ฎคๆ˜ฏๆญฃ็กฎๆ ผๅผ็คบไพ‹)"),
920
+ value=find_audios(True),
921
+ choices=find_audios()
922
+ )
923
+ record_button.change(fn=save_wav, inputs=[record_button], outputs=[input_audio0])
924
+ dropbox.upload(fn=save_wav, inputs=[dropbox], outputs=[input_audio0])
925
+ with gr.Column():
926
+ with gr.Accordion(label=i18n("่‡ชๅŠจๆฃ€ๆต‹index่ทฏๅพ„,ไธ‹ๆ‹‰ๅผ้€‰ๆ‹ฉ(dropdown)"), open=False):
927
+ file_index2 = gr.Dropdown(
928
+ label=i18n("่‡ชๅŠจๆฃ€ๆต‹index่ทฏๅพ„,ไธ‹ๆ‹‰ๅผ้€‰ๆ‹ฉ(dropdown)"),
929
+ choices=get_indexes(),
930
+ interactive=True,
931
+ value=get_index()
932
+ )
933
+ index_rate1 = gr.Slider(
934
+ minimum=0,
935
+ maximum=1,
936
+ label=i18n("ๆฃ€็ดข็‰นๅพๅ ๆฏ”"),
937
+ value=0.66,
938
+ interactive=True,
939
+ )
940
+ vc_output2 = gr.Audio(label=i18n("่พ“ๅ‡บ้Ÿณ้ข‘(ๅณไธ‹่ง’ไธ‰ไธช็‚น,็‚นไบ†ๅฏไปฅไธ‹่ฝฝ)"))
941
+ with gr.Accordion(label=i18n("ๅธธ่ง„่ฎพ็ฝฎ"), open=False):
942
+ f0method0 = gr.Radio(
943
+ label=i18n(
944
+ "้€‰ๆ‹ฉ้Ÿณ้ซ˜ๆๅ–็ฎ—ๆณ•,่พ“ๅ…ฅๆญŒๅฃฐๅฏ็”จpmๆ้€Ÿ,harvestไฝŽ้Ÿณๅฅฝไฝ†ๅทจๆ…ขๆ— ๆฏ”,crepeๆ•ˆๆžœๅฅฝไฝ†ๅƒGPU,rmvpeๆ•ˆๆžœๆœ€ๅฅฝไธ”ๅพฎๅƒGPU"
945
+ ),
946
+ choices=["pm", "harvest", "crepe", "rmvpe"]
947
+ if config.dml == False
948
+ else ["pm", "harvest", "rmvpe"],
949
+ value="rmvpe",
950
+ interactive=True,
951
+ )
952
+ filter_radius0 = gr.Slider(
953
+ minimum=0,
954
+ maximum=7,
955
+ label=i18n(">=3ๅˆ™ไฝฟ็”จๅฏนharvest้Ÿณ้ซ˜่ฏ†ๅˆซ็š„็ป“ๆžœไฝฟ็”จไธญๅ€ผๆปคๆณข๏ผŒๆ•ฐๅ€ผไธบๆปคๆณขๅŠๅพ„๏ผŒไฝฟ็”จๅฏไปฅๅ‰Šๅผฑๅ“‘้Ÿณ"),
956
+ value=3,
957
+ step=1,
958
+ interactive=True,
959
+ )
960
+ resample_sr0 = gr.Slider(
961
+ minimum=0,
962
+ maximum=48000,
963
+ label=i18n("ๅŽๅค„็†้‡้‡‡ๆ ท่‡ณๆœ€็ปˆ้‡‡ๆ ท็Ž‡๏ผŒ0ไธบไธ่ฟ›่กŒ้‡้‡‡ๆ ท"),
964
+ value=0,
965
+ step=1,
966
+ interactive=True,
967
+ )
968
+ rms_mix_rate0 = gr.Slider(
969
+ minimum=0,
970
+ maximum=1,
971
+ label=i18n("่พ“ๅ…ฅๆบ้Ÿณ้‡ๅŒ…็ปœๆ›ฟๆข่พ“ๅ‡บ้Ÿณ้‡ๅŒ…็ปœ่žๅˆๆฏ”ไพ‹๏ผŒ่ถŠ้ ่ฟ‘1่ถŠไฝฟ็”จ่พ“ๅ‡บๅŒ…็ปœ"),
972
+ value=0.21,
973
+ interactive=True,
974
+ )
975
+ protect0 = gr.Slider(
976
+ minimum=0,
977
+ maximum=0.5,
978
+ label=i18n(
979
+ "ไฟๆŠคๆธ…่พ…้Ÿณๅ’Œๅ‘ผๅธๅฃฐ๏ผŒ้˜ฒๆญข็”ต้Ÿณๆ’•่ฃ‚็ญ‰artifact๏ผŒๆ‹‰ๆปก0.5ไธๅผ€ๅฏ๏ผŒ่ฐƒไฝŽๅŠ ๅคงไฟๆŠคๅŠ›ๅบฆไฝ†ๅฏ่ƒฝ้™ไฝŽ็ดขๅผ•ๆ•ˆๆžœ"
980
+ ),
981
+ value=0.33,
982
+ step=0.01,
983
+ interactive=True,
984
+ )
985
+ file_index1 = gr.Textbox(
986
+ label=i18n("็‰นๅพๆฃ€็ดขๅบ“ๆ–‡ไปถ่ทฏๅพ„,ไธบ็ฉบๅˆ™ไฝฟ็”จไธ‹ๆ‹‰็š„้€‰ๆ‹ฉ็ป“ๆžœ"),
987
+ value="",
988
+ interactive=True,
989
+ visible=False
990
+ )
991
+ refresh_button.click(
992
+ fn=change_choices,
993
+ inputs=[],
994
+ outputs=[sid0, file_index2, input_audio0],
995
+ api_name="infer_refresh",
996
+ )
997
+ # file_big_npy1 = gr.Textbox(
998
+ # label=i18n("็‰นๅพๆ–‡ไปถ่ทฏๅพ„"),
999
+ # value="E:\\codes\py39\\vits_vc_gpu_train\\logs\\mi-test-1key\\total_fea.npy",
1000
+ # interactive=True,
1001
+ # )
1002
+ with gr.Row():
1003
+ f0_file = gr.File(label=i18n("F0ๆ›ฒ็บฟๆ–‡ไปถ, ๅฏ้€‰, ไธ€่กŒไธ€ไธช้Ÿณ้ซ˜, ไปฃๆ›ฟ้ป˜่ฎคF0ๅŠๅ‡้™่ฐƒ"), visible=False)
1004
+ with gr.Row():
1005
+ vc_output1 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"))
1006
+ but0.click(
1007
+ vc.vc_single,
1008
+ [
1009
+ spk_item,
1010
+ input_audio0,
1011
+ vc_transform0,
1012
+ f0_file,
1013
+ f0method0,
1014
+ file_index1,
1015
+ file_index2,
1016
+ # file_big_npy1,
1017
+ index_rate1,
1018
+ filter_radius0,
1019
+ resample_sr0,
1020
+ rms_mix_rate0,
1021
+ protect0,
1022
+ ],
1023
+ [vc_output1, vc_output2],
1024
+ api_name="infer_convert",
1025
+ )
1026
+ with gr.Row():
1027
+ with gr.Accordion(open=False, label=i18n("ๆ‰น้‡่ฝฌๆข, ่พ“ๅ…ฅๅพ…่ฝฌๆข้Ÿณ้ข‘ๆ–‡ไปถๅคน, ๆˆ–ไธŠไผ ๅคšไธช้Ÿณ้ข‘ๆ–‡ไปถ, ๅœจๆŒ‡ๅฎšๆ–‡ไปถๅคน(้ป˜่ฎคopt)ไธ‹่พ“ๅ‡บ่ฝฌๆข็š„้Ÿณ้ข‘. ")):
1028
+ with gr.Column():
1029
+ vc_transform1 = gr.Number(
1030
+ label=i18n("ๅ˜่ฐƒ(ๆ•ดๆ•ฐ, ๅŠ้Ÿณๆ•ฐ้‡, ๅ‡ๅ…ซๅบฆ12้™ๅ…ซๅบฆ-12)"), value=0
1031
+ )
1032
+ opt_input = gr.Textbox(label=i18n("ๆŒ‡ๅฎš่พ“ๅ‡บๆ–‡ไปถๅคน"), value="opt")
1033
+ f0method1 = gr.Radio(
1034
+ label=i18n(
1035
+ "้€‰ๆ‹ฉ้Ÿณ้ซ˜ๆๅ–็ฎ—ๆณ•,่พ“ๅ…ฅๆญŒๅฃฐๅฏ็”จpmๆ้€Ÿ,harvestไฝŽ้Ÿณๅฅฝไฝ†ๅทจๆ…ขๆ— ๆฏ”,crepeๆ•ˆๆžœๅฅฝไฝ†ๅƒGPU,rmvpeๆ•ˆๆžœๆœ€ๅฅฝไธ”ๅพฎๅƒGPU"
1036
+ ),
1037
+ choices=["pm", "harvest", "crepe", "rmvpe"]
1038
+ if config.dml == False
1039
+ else ["pm", "harvest", "rmvpe"],
1040
+ value="pm",
1041
+ interactive=True,
1042
+ )
1043
+ filter_radius1 = gr.Slider(
1044
+ minimum=0,
1045
+ maximum=7,
1046
+ label=i18n(">=3ๅˆ™ไฝฟ็”จๅฏนharvest้Ÿณ้ซ˜่ฏ†ๅˆซ็š„็ป“ๆžœไฝฟ็”จไธญๅ€ผๆปคๆณข๏ผŒๆ•ฐๅ€ผไธบๆปคๆณขๅŠๅพ„๏ผŒไฝฟ็”จๅฏไปฅๅ‰Šๅผฑๅ“‘้Ÿณ"),
1047
+ value=3,
1048
+ step=1,
1049
+ interactive=True,
1050
+ )
1051
+ with gr.Column():
1052
+ file_index3 = gr.Textbox(
1053
+ label=i18n("็‰นๅพๆฃ€็ดขๅบ“ๆ–‡ไปถ่ทฏๅพ„,ไธบ็ฉบๅˆ™ไฝฟ็”จไธ‹ๆ‹‰็š„้€‰ๆ‹ฉ็ป“ๆžœ"),
1054
+ value="",
1055
+ interactive=True,
1056
+ visible=False
1057
+ )
1058
+ file_index4 = gr.Dropdown(
1059
+ label=i18n("่‡ชๅŠจๆฃ€ๆต‹index่ทฏๅพ„,ไธ‹ๆ‹‰ๅผ้€‰ๆ‹ฉ(dropdown)"),
1060
+ choices=sorted(index_paths),
1061
+ interactive=True,
1062
+ )
1063
+ refresh_button.click(
1064
+ fn=lambda: change_choices()[1],
1065
+ inputs=[],
1066
+ outputs=file_index4,
1067
+ api_name="infer_refresh_batch",
1068
+ )
1069
+ # file_big_npy2 = gr.Textbox(
1070
+ # label=i18n("็‰นๅพๆ–‡ไปถ่ทฏๅพ„"),
1071
+ # value="E:\\codes\\py39\\vits_vc_gpu_train\\logs\\mi-test-1key\\total_fea.npy",
1072
+ # interactive=True,
1073
+ # )
1074
+ index_rate2 = gr.Slider(
1075
+ minimum=0,
1076
+ maximum=1,
1077
+ label=i18n("ๆฃ€็ดข็‰นๅพๅ ๆฏ”"),
1078
+ value=1,
1079
+ interactive=True,
1080
+ )
1081
+ with gr.Column():
1082
+ resample_sr1 = gr.Slider(
1083
+ minimum=0,
1084
+ maximum=48000,
1085
+ label=i18n("ๅŽๅค„็†้‡้‡‡ๆ ท่‡ณๆœ€็ปˆ้‡‡ๆ ท็Ž‡๏ผŒ0ไธบไธ่ฟ›่กŒ้‡้‡‡ๆ ท"),
1086
+ value=0,
1087
+ step=1,
1088
+ interactive=True,
1089
+ )
1090
+ rms_mix_rate1 = gr.Slider(
1091
+ minimum=0,
1092
+ maximum=1,
1093
+ label=i18n("่พ“ๅ…ฅๆบ้Ÿณ้‡ๅŒ…็ปœๆ›ฟๆข่พ“ๅ‡บ้Ÿณ้‡ๅŒ…็ปœ่žๅˆๆฏ”ไพ‹๏ผŒ่ถŠ้ ่ฟ‘1่ถŠไฝฟ็”จ่พ“ๅ‡บๅŒ…็ปœ"),
1094
+ value=1,
1095
+ interactive=True,
1096
+ )
1097
+ protect1 = gr.Slider(
1098
+ minimum=0,
1099
+ maximum=0.5,
1100
+ label=i18n(
1101
+ "ไฟๆŠคๆธ…่พ…้Ÿณๅ’Œๅ‘ผๅธๅฃฐ๏ผŒ้˜ฒๆญข็”ต้Ÿณๆ’•่ฃ‚็ญ‰artifact๏ผŒๆ‹‰ๆปก0.5ไธๅผ€ๅฏ๏ผŒ่ฐƒไฝŽๅŠ ๅคงไฟๆŠคๅŠ›ๅบฆไฝ†ๅฏ่ƒฝ้™ไฝŽ็ดขๅผ•ๆ•ˆๆžœ"
1102
+ ),
1103
+ value=0.33,
1104
+ step=0.01,
1105
+ interactive=True,
1106
+ )
1107
+ with gr.Column():
1108
+ dir_input = gr.Textbox(
1109
+ label=i18n("่พ“ๅ…ฅๅพ…ๅค„็†้Ÿณ้ข‘ๆ–‡ไปถๅคน่ทฏๅพ„(ๅŽปๆ–‡ไปถ็ฎก็†ๅ™จๅœฐๅ€ๆ ๆ‹ทๅฐฑ่กŒไบ†)"),
1110
+ value="E:\codes\py39\\test-20230416b\\todo-songs",
1111
+ )
1112
+ inputs = gr.File(
1113
+ file_count="multiple", label=i18n("ไนŸๅฏๆ‰น้‡่พ“ๅ…ฅ้Ÿณ้ข‘ๆ–‡ไปถ, ไบŒ้€‰ไธ€, ไผ˜ๅ…ˆ่ฏปๆ–‡ไปถๅคน")
1114
+ )
1115
+ with gr.Row():
1116
+ format1 = gr.Radio(
1117
+ label=i18n("ๅฏผๅ‡บๆ–‡ไปถๆ ผๅผ"),
1118
+ choices=["wav", "flac", "mp3", "m4a"],
1119
+ value="flac",
1120
+ interactive=True,
1121
+ )
1122
+ but1 = gr.Button(i18n("่ฝฌๆข"), variant="primary")
1123
+ vc_output3 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"))
1124
+ but1.click(
1125
+ vc.vc_multi,
1126
+ [
1127
+ spk_item,
1128
+ dir_input,
1129
+ opt_input,
1130
+ inputs,
1131
+ vc_transform1,
1132
+ f0method1,
1133
+ file_index3,
1134
+ file_index4,
1135
+ # file_big_npy2,
1136
+ index_rate2,
1137
+ filter_radius1,
1138
+ resample_sr1,
1139
+ rms_mix_rate1,
1140
+ protect1,
1141
+ format1,
1142
+ ],
1143
+ [vc_output3],
1144
+ api_name="infer_convert_batch",
1145
+ )
1146
+ sid0.change(
1147
+ fn=vc.get_vc,
1148
+ inputs=[sid0, protect0, protect1],
1149
+ outputs=[spk_item, protect0, protect1, file_index2, file_index4],
1150
+ )
1151
+ with gr.TabItem("Download Model"):
1152
+ with gr.Row():
1153
+ url=gr.Textbox(label="Enter the URL to the Model:")
1154
+ with gr.Row():
1155
+ model = gr.Textbox(label="Name your model:")
1156
+ download_button=gr.Button("Download")
1157
+ with gr.Row():
1158
+ status_bar=gr.Textbox(label="")
1159
+ download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
1160
+ with gr.Row():
1161
+ gr.Markdown(
1162
+ """
1163
+ โค๏ธ If you like the EasyGUI, help me keep it.โค๏ธ
1164
+ https://paypal.me/lesantillan
1165
+ """
1166
+ )
1167
+ with gr.TabItem(i18n("่ฎญ็ปƒ")):
1168
+ with gr.Row():
1169
+ with gr.Column():
1170
+ exp_dir1 = gr.Textbox(label=i18n("่พ“ๅ…ฅๅฎž้ชŒๅ"), value="My-Voice")
1171
+ np7 = gr.Slider(
1172
+ minimum=0,
1173
+ maximum=config.n_cpu,
1174
+ step=1,
1175
+ label=i18n("ๆๅ–้Ÿณ้ซ˜ๅ’Œๅค„็†ๆ•ฐๆฎไฝฟ็”จ็š„CPU่ฟ›็จ‹ๆ•ฐ"),
1176
+ value=int(np.ceil(config.n_cpu / 1.5)),
1177
+ interactive=True,
1178
+ )
1179
+ sr2 = gr.Radio(
1180
+ label=i18n("็›ฎๆ ‡้‡‡ๆ ท็Ž‡"),
1181
+ choices=["40k", "48k"],
1182
+ value="40k",
1183
+ interactive=True,
1184
+ visible=False
1185
+ )
1186
+ if_f0_3 = gr.Radio(
1187
+ label=i18n("ๆจกๅž‹ๆ˜ฏๅฆๅธฆ้Ÿณ้ซ˜ๆŒ‡ๅฏผ(ๅ”ฑๆญŒไธ€ๅฎš่ฆ, ่ฏญ้Ÿณๅฏไปฅไธ่ฆ)"),
1188
+ choices=[True, False],
1189
+ value=True,
1190
+ interactive=True,
1191
+ visible=False
1192
+ )
1193
+ version19 = gr.Radio(
1194
+ label=i18n("็‰ˆๆœฌ"),
1195
+ choices=["v1", "v2"],
1196
+ value="v2",
1197
+ interactive=True,
1198
+ visible=False,
1199
+ )
1200
+ trainset_dir4 = gr.Textbox(
1201
+ label=i18n("่พ“ๅ…ฅ่ฎญ็ปƒๆ–‡ไปถๅคน่ทฏๅพ„"), value='./dataset/'+datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
1202
+ )
1203
+ easy_uploader = gr.Files(label=i18n("ไนŸๅฏๆ‰น้‡่พ“ๅ…ฅ้Ÿณ้ข‘ๆ–‡ไปถ, ไบŒ้€‰ไธ€, ไผ˜ๅ…ˆ่ฏปๆ–‡ไปถๅคน"),file_types=['audio'])
1204
+ but1 = gr.Button(label=i18n("ๅค„็†ๆ•ฐๆฎ"), variant="primary")
1205
+ info1 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"), value="")
1206
+ easy_uploader.upload(fn=upload_to_dataset, inputs=[easy_uploader, trainset_dir4], outputs=[info1, trainset_dir4])
1207
+ gpus6 = gr.Textbox(
1208
+ label=i18n("ไปฅ-ๅˆ†้š”่พ“ๅ…ฅไฝฟ็”จ็š„ๅกๅท, ไพ‹ๅฆ‚ 0-1-2 ไฝฟ็”จๅก0ๅ’Œๅก1ๅ’Œๅก2"),
1209
+ value=gpus,
1210
+ interactive=True,
1211
+ visible=F0GPUVisible,
1212
+ )
1213
+ gpu_info9 = gr.Textbox(
1214
+ label=i18n("ๆ˜พๅกไฟกๆฏ"), value=gpu_info, visible=F0GPUVisible
1215
+ )
1216
+ spk_id5 = gr.Slider(
1217
+ minimum=0,
1218
+ maximum=4,
1219
+ step=1,
1220
+ label=i18n("่ฏทๆŒ‡ๅฎš่ฏด่ฏไบบid"),
1221
+ value=0,
1222
+ interactive=True,
1223
+ visible=False
1224
+ )
1225
+ but1.click(
1226
+ preprocess_dataset,
1227
+ [trainset_dir4, exp_dir1, sr2, np7],
1228
+ [info1],
1229
+ api_name="train_preprocess",
1230
+ )
1231
+ with gr.Column():
1232
+ f0method8 = gr.Radio(
1233
+ label=i18n(
1234
+ "้€‰ๆ‹ฉ้Ÿณ้ซ˜ๆๅ–็ฎ—ๆณ•:่พ“ๅ…ฅๆญŒๅฃฐๅฏ็”จpmๆ้€Ÿ,้ซ˜่ดจ้‡่ฏญ้Ÿณไฝ†CPUๅทฎๅฏ็”จdioๆ้€Ÿ,harvest่ดจ้‡ๆ›ดๅฅฝไฝ†ๆ…ข,rmvpeๆ•ˆๆžœๆœ€ๅฅฝไธ”ๅพฎๅƒCPU/GPU"
1235
+ ),
1236
+ choices=["pm", "harvest", "dio", "rmvpe", "rmvpe_gpu"],
1237
+ value="rmvpe_gpu",
1238
+ interactive=True,
1239
+ )
1240
+ gpus_rmvpe = gr.Textbox(
1241
+ label=i18n(
1242
+ "rmvpeๅกๅท้…็ฝฎ๏ผšไปฅ-ๅˆ†้š”่พ“ๅ…ฅไฝฟ็”จ็š„ไธๅŒ่ฟ›็จ‹ๅกๅท,ไพ‹ๅฆ‚0-0-1ไฝฟ็”จๅœจๅก0ไธŠ่ท‘2ไธช่ฟ›็จ‹ๅนถๅœจๅก1ไธŠ่ท‘1ไธช่ฟ›็จ‹"
1243
+ ),
1244
+ value="%s-%s" % (gpus, gpus),
1245
+ interactive=True,
1246
+ visible=F0GPUVisible,
1247
+ )
1248
+ but2 = gr.Button(i18n("็‰นๅพๆๅ–"), variant="primary")
1249
+ info2 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"), value="", max_lines=8)
1250
+ f0method8.change(
1251
+ fn=change_f0_method,
1252
+ inputs=[f0method8],
1253
+ outputs=[gpus_rmvpe],
1254
+ )
1255
+ but2.click(
1256
+ extract_f0_feature,
1257
+ [
1258
+ gpus6,
1259
+ np7,
1260
+ f0method8,
1261
+ if_f0_3,
1262
+ exp_dir1,
1263
+ version19,
1264
+ gpus_rmvpe,
1265
+ ],
1266
+ [info2],
1267
+ api_name="train_extract_f0_feature",
1268
+ )
1269
+ with gr.Column():
1270
+ total_epoch11 = gr.Slider(
1271
+ minimum=2,
1272
+ maximum=1000,
1273
+ step=1,
1274
+ label=i18n("ๆ€ป่ฎญ็ปƒ่ฝฎๆ•ฐtotal_epoch"),
1275
+ value=150,
1276
+ interactive=True,
1277
+ )
1278
+ gpus16 = gr.Textbox(
1279
+ label=i18n("ไปฅ-ๅˆ†้š”่พ“ๅ…ฅไฝฟ็”จ็š„ๅกๅท, ไพ‹ๅฆ‚ 0-1-2 ไฝฟ็”จๅก0ๅ’Œๅก1ๅ’Œๅก2"),
1280
+ value="0",
1281
+ interactive=True,
1282
+ visible=True
1283
+ )
1284
+ but3 = gr.Button(i18n("่ฎญ็ปƒๆจกๅž‹"), variant="primary")
1285
+ but4 = gr.Button(i18n("่ฎญ็ปƒ็‰นๅพ็ดขๅผ•"), variant="primary")
1286
+ info3 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"), value="", max_lines=10)
1287
+ with gr.Accordion(label=i18n("ๅธธ่ง„่ฎพ็ฝฎ"), open=False):
1288
+ save_epoch10 = gr.Slider(
1289
+ minimum=1,
1290
+ maximum=50,
1291
+ step=1,
1292
+ label=i18n("ไฟๅญ˜้ข‘็Ž‡save_every_epoch"),
1293
+ value=25,
1294
+ interactive=True,
1295
+ )
1296
+ batch_size12 = gr.Slider(
1297
+ minimum=1,
1298
+ maximum=40,
1299
+ step=1,
1300
+ label=i18n("ๆฏๅผ ๆ˜พๅก็š„batch_size"),
1301
+ value=default_batch_size,
1302
+ interactive=True,
1303
+ )
1304
+ if_save_latest13 = gr.Radio(
1305
+ label=i18n("ๆ˜ฏๅฆไป…ไฟๅญ˜ๆœ€ๆ–ฐ็š„ckptๆ–‡ไปถไปฅ่Š‚็œ็กฌ็›˜็ฉบ้—ด"),
1306
+ choices=[i18n("ๆ˜ฏ"), i18n("ๅฆ")],
1307
+ value=i18n("ๆ˜ฏ"),
1308
+ interactive=True,
1309
+ )
1310
+ if_cache_gpu17 = gr.Radio(
1311
+ label=i18n(
1312
+ "ๆ˜ฏๅฆ็ผ“ๅญ˜ๆ‰€ๆœ‰่ฎญ็ปƒ้›†่‡ณๆ˜พๅญ˜. 10minไปฅไธ‹ๅฐๆ•ฐๆฎๅฏ็ผ“ๅญ˜ไปฅๅŠ ้€Ÿ่ฎญ็ปƒ, ๅคงๆ•ฐๆฎ็ผ“ๅญ˜ไผš็‚ธๆ˜พๅญ˜ไนŸๅŠ ไธไบ†ๅคšๅฐ‘้€Ÿ"
1313
+ ),
1314
+ choices=[i18n("ๆ˜ฏ"), i18n("ๅฆ")],
1315
+ value=i18n("ๅฆ"),
1316
+ interactive=True,
1317
+ )
1318
+ if_save_every_weights18 = gr.Radio(
1319
+ label=i18n("ๆ˜ฏๅฆๅœจๆฏๆฌกไฟๅญ˜ๆ—ถ้—ด็‚นๅฐ†ๆœ€็ปˆๅฐๆจกๅž‹ไฟๅญ˜่‡ณweightsๆ–‡ไปถๅคน"),
1320
+ choices=[i18n("ๆ˜ฏ"), i18n("ๅฆ")],
1321
+ value=i18n("ๆ˜ฏ"),
1322
+ interactive=True,
1323
+ )
1324
+ with gr.Row():
1325
+ pretrained_G14 = gr.Textbox(
1326
+ label=i18n("ๅŠ ่ฝฝ้ข„่ฎญ็ปƒๅบ•ๆจกG่ทฏๅพ„"),
1327
+ value="assets/pretrained_v2/f0G40k.pth",
1328
+ interactive=True,
1329
+ visible=False
1330
+ )
1331
+ pretrained_D15 = gr.Textbox(
1332
+ label=i18n("ๅŠ ่ฝฝ้ข„่ฎญ็ปƒๅบ•ๆจกD่ทฏๅพ„"),
1333
+ value="assets/pretrained_v2/f0D40k.pth",
1334
+ interactive=True,
1335
+ visible=False
1336
+ )
1337
+ sr2.change(
1338
+ change_sr2,
1339
+ [sr2, if_f0_3, version19],
1340
+ [pretrained_G14, pretrained_D15],
1341
+ )
1342
+ version19.change(
1343
+ change_version19,
1344
+ [sr2, if_f0_3, version19],
1345
+ [pretrained_G14, pretrained_D15, sr2],
1346
+ )
1347
+ if_f0_3.change(
1348
+ change_f0,
1349
+ [if_f0_3, sr2, version19],
1350
+ [f0method8, pretrained_G14, pretrained_D15],
1351
+ )
1352
+ with gr.Row():
1353
+ but5 = gr.Button(i18n("ไธ€้”ฎ่ฎญ็ปƒ"), variant="primary", visible=False)
1354
+ but3.click(
1355
+ click_train,
1356
+ [
1357
+ exp_dir1,
1358
+ sr2,
1359
+ if_f0_3,
1360
+ spk_id5,
1361
+ save_epoch10,
1362
+ total_epoch11,
1363
+ batch_size12,
1364
+ if_save_latest13,
1365
+ pretrained_G14,
1366
+ pretrained_D15,
1367
+ gpus16,
1368
+ if_cache_gpu17,
1369
+ if_save_every_weights18,
1370
+ version19,
1371
+ ],
1372
+ info3,
1373
+ api_name="train_start",
1374
+ )
1375
+ but4.click(train_index, [exp_dir1, version19], info3)
1376
+ but5.click(
1377
+ train1key,
1378
+ [
1379
+ exp_dir1,
1380
+ sr2,
1381
+ if_f0_3,
1382
+ trainset_dir4,
1383
+ spk_id5,
1384
+ np7,
1385
+ f0method8,
1386
+ save_epoch10,
1387
+ total_epoch11,
1388
+ batch_size12,
1389
+ if_save_latest13,
1390
+ pretrained_G14,
1391
+ pretrained_D15,
1392
+ gpus16,
1393
+ if_cache_gpu17,
1394
+ if_save_every_weights18,
1395
+ version19,
1396
+ gpus_rmvpe,
1397
+ ],
1398
+ info3,
1399
+ api_name="train_start_all",
1400
+ )
1401
+
1402
+ if config.iscolab:
1403
+ app.queue(concurrency_count=511, max_size=1022).launch(share=True)
1404
+ else:
1405
+ app.queue(concurrency_count=511, max_size=1022).launch(
1406
+ server_name="0.0.0.0",
1407
+ inbrowser=not config.noautoopen,
1408
+ server_port=config.listen_port,
1409
+ quiet=True,
1410
+ )
LICENSE ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 liujing04
4
+ Copyright (c) 2023 ๆบๆ–‡้›จ
5
+ Copyright (c) 2023 Ftps
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
MITๅ่ฎฎๆšจ็›ธๅ…ณๅผ•็”จๅบ“ๅ่ฎฎ ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ๆœฌ่ฝฏไปถๅŠๅ…ถ็›ธๅ…ณไปฃ็ ไปฅMITๅ่ฎฎๅผ€ๆบ๏ผŒไฝœ่€…ไธๅฏน่ฝฏไปถๅ…ทๅค‡ไปปไฝ•ๆŽงๅˆถๅŠ›๏ผŒไฝฟ็”จ่ฝฏไปถ่€…ใ€ไผ ๆ’ญ่ฝฏไปถๅฏผๅ‡บ็š„ๅฃฐ้Ÿณ่€…่‡ช่ดŸๅ…จ่ดฃใ€‚
2
+ ๅฆ‚ไธ่ฎคๅฏ่ฏฅๆกๆฌพ๏ผŒๅˆ™ไธ่ƒฝไฝฟ็”จๆˆ–ๅผ•็”จ่ฝฏไปถๅŒ…ๅ†…ไปปไฝ•ไปฃ็ ๅ’Œๆ–‡ไปถใ€‚
3
+
4
+ ็‰นๆญคๆŽˆไบˆไปปไฝ•่Žทๅพ—ๆœฌ่ฝฏไปถๅ’Œ็›ธๅ…ณๆ–‡ๆกฃๆ–‡ไปถ๏ผˆไปฅไธ‹็ฎ€็งฐโ€œ่ฝฏไปถโ€๏ผ‰ๅ‰ฏๆœฌ็š„ไบบๅ…่ดนไฝฟ็”จใ€ๅคๅˆถใ€ไฟฎๆ”นใ€ๅˆๅนถใ€ๅ‡บ็‰ˆใ€ๅˆ†ๅ‘ใ€ๅ†ๆŽˆๆƒๅ’Œ/ๆˆ–้”€ๅ”ฎๆœฌ่ฝฏไปถ็š„ๆƒๅˆฉ๏ผŒไปฅๅŠๆŽˆไบˆๆœฌ่ฝฏไปถๆ‰€ๆไพ›็š„ไบบไฝฟ็”จๆœฌ่ฝฏไปถ็š„ๆƒๅˆฉ๏ผŒไฝ†้กป็ฌฆๅˆไปฅไธ‹ๆกไปถ๏ผš
5
+ ไธŠ่ฟฐ็‰ˆๆƒๅฃฐๆ˜Žๅ’Œๆœฌ่ฎธๅฏๅฃฐๆ˜Žๅบ”ๅŒ…ๅซๅœจ่ฝฏไปถ็š„ๆ‰€ๆœ‰ๅ‰ฏๆœฌๆˆ–ๅฎž่ดจ้ƒจๅˆ†ไธญใ€‚
6
+ ่ฝฏไปถๆ˜ฏโ€œๆŒ‰ๅŽŸๆ ทโ€ๆไพ›็š„๏ผŒๆฒกๆœ‰ไปปไฝ•ๆ˜Ž็คบๆˆ–ๆš—็คบ็š„ไฟ่ฏ๏ผŒๅŒ…ๆ‹ฌไฝ†ไธ้™ไบŽ้€‚้”€ๆ€งใ€้€‚็”จไบŽ็‰นๅฎš็›ฎ็š„ๅ’Œไธไพตๆƒ็š„ไฟ่ฏใ€‚ๅœจไปปไฝ•ๆƒ…ๅ†ตไธ‹๏ผŒไฝœ่€…ๆˆ–็‰ˆๆƒๆŒๆœ‰ไบบๅ‡ไธๆ‰ฟๆ‹…ๅ› ่ฝฏไปถๆˆ–่ฝฏไปถ็š„ไฝฟ็”จๆˆ–ๅ…ถไป–ไบคๆ˜“่€Œไบง็”Ÿใ€ไบง็”Ÿๆˆ–ไธŽไน‹็›ธๅ…ณ็š„ไปปไฝ•็ดข่ต”ใ€ๆŸๅฎณ่ต”ๅฟๆˆ–ๅ…ถไป–่ดฃไปป๏ผŒๆ— ่ฎบๆ˜ฏๅœจๅˆๅŒ่ฏ‰่ฎผใ€ไพตๆƒ่ฏ‰่ฎผ่ฟ˜ๆ˜ฏๅ…ถไป–่ฏ‰่ฎผไธญใ€‚
7
+
8
+
9
+ The LICENCEs for related libraries are as follows.
10
+ ็›ธๅ…ณๅผ•็”จๅบ“ๅ่ฎฎๅฆ‚ไธ‹๏ผš
11
+
12
+ ContentVec
13
+ https://github.com/auspicious3000/contentvec/blob/main/LICENSE
14
+ MIT License
15
+
16
+ VITS
17
+ https://github.com/jaywalnut310/vits/blob/main/LICENSE
18
+ MIT License
19
+
20
+ HIFIGAN
21
+ https://github.com/jik876/hifi-gan/blob/master/LICENSE
22
+ MIT License
23
+
24
+ gradio
25
+ https://github.com/gradio-app/gradio/blob/main/LICENSE
26
+ Apache License 2.0
27
+
28
+ ffmpeg
29
+ https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3
30
+ https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-02-28-12-32/ffmpeg-n4.3.2-160-gfbb9368226-win64-lgpl-4.3.zip
31
+ LPGLv3 License
32
+ MIT License
33
+
34
+ ultimatevocalremovergui
35
+ https://github.com/Anjok07/ultimatevocalremovergui/blob/master/LICENSE
36
+ https://github.com/yang123qwe/vocal_separation_by_uvr5
37
+ MIT License
38
+
39
+ audio-slicer
40
+ https://github.com/openvpi/audio-slicer/blob/main/LICENSE
41
+ MIT License
42
+
43
+ PySimpleGUI
44
+ https://github.com/PySimpleGUI/PySimpleGUI/blob/master/license.txt
45
+ LPGLv3 License
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
+ }
a.png ADDED
app.py ADDED
@@ -0,0 +1,1441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os, sys
2
+ import datetime, subprocess
3
+ from mega import Mega
4
+ now_dir = os.getcwd()
5
+ sys.path.append(now_dir)
6
+ import logging
7
+ import shutil
8
+ import threading
9
+ import traceback
10
+ import warnings
11
+ from random import shuffle
12
+ from subprocess import Popen
13
+ from time import sleep
14
+ import json
15
+ import pathlib
16
+
17
+ import fairseq
18
+ import faiss
19
+ import gradio as gr
20
+ import numpy as np
21
+ import torch
22
+ from dotenv import load_dotenv
23
+ from sklearn.cluster import MiniBatchKMeans
24
+
25
+ from configs.config import Config
26
+ from i18n.i18n import I18nAuto
27
+ from infer.lib.train.process_ckpt import (
28
+ change_info,
29
+ extract_small_model,
30
+ merge,
31
+ show_info,
32
+ )
33
+ from infer.modules.uvr5.modules import uvr
34
+ from infer.modules.vc.modules import VC
35
+ logging.getLogger("numba").setLevel(logging.WARNING)
36
+
37
+ logger = logging.getLogger(__name__)
38
+
39
+ tmp = os.path.join(now_dir, "TEMP")
40
+ shutil.rmtree(tmp, ignore_errors=True)
41
+ shutil.rmtree("%s/runtime/Lib/site-packages/infer_pack" % (now_dir), ignore_errors=True)
42
+ shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True)
43
+ os.makedirs(tmp, exist_ok=True)
44
+ os.makedirs(os.path.join(now_dir, "logs"), exist_ok=True)
45
+ os.makedirs(os.path.join(now_dir, "assets/weights"), exist_ok=True)
46
+ os.environ["TEMP"] = tmp
47
+ warnings.filterwarnings("ignore")
48
+ torch.manual_seed(114514)
49
+
50
+
51
+ load_dotenv()
52
+ config = Config()
53
+ vc = VC(config)
54
+
55
+ if config.dml == True:
56
+
57
+ def forward_dml(ctx, x, scale):
58
+ ctx.scale = scale
59
+ res = x.clone().detach()
60
+ return res
61
+
62
+ fairseq.modules.grad_multiply.GradMultiply.forward = forward_dml
63
+ i18n = I18nAuto()
64
+ logger.info(i18n)
65
+ # ๅˆคๆ–ญๆ˜ฏๅฆๆœ‰่ƒฝ็”จๆฅ่ฎญ็ปƒๅ’ŒๅŠ ้€ŸๆŽจ็†็š„Nๅก
66
+ ngpu = torch.cuda.device_count()
67
+ gpu_infos = []
68
+ mem = []
69
+ if_gpu_ok = False
70
+
71
+ if torch.cuda.is_available() or ngpu != 0:
72
+ for i in range(ngpu):
73
+ gpu_name = torch.cuda.get_device_name(i)
74
+ if any(
75
+ value in gpu_name.upper()
76
+ for value in [
77
+ "10",
78
+ "16",
79
+ "20",
80
+ "30",
81
+ "40",
82
+ "A2",
83
+ "A3",
84
+ "A4",
85
+ "P4",
86
+ "A50",
87
+ "500",
88
+ "A60",
89
+ "70",
90
+ "80",
91
+ "90",
92
+ "M4",
93
+ "T4",
94
+ "TITAN",
95
+ ]
96
+ ):
97
+ # A10#A100#V100#A40#P40#M40#K80#A4500
98
+ if_gpu_ok = True # ่‡ณๅฐ‘ๆœ‰ไธ€ๅผ ่ƒฝ็”จ็š„Nๅก
99
+ gpu_infos.append("%s\t%s" % (i, gpu_name))
100
+ mem.append(
101
+ int(
102
+ torch.cuda.get_device_properties(i).total_memory
103
+ / 1024
104
+ / 1024
105
+ / 1024
106
+ + 0.4
107
+ )
108
+ )
109
+ if if_gpu_ok and len(gpu_infos) > 0:
110
+ gpu_info = "\n".join(gpu_infos)
111
+ default_batch_size = min(mem) // 2
112
+ else:
113
+ gpu_info = i18n("ๅพˆ้—ๆ†พๆ‚จ่ฟ™ๆฒกๆœ‰่ƒฝ็”จ็š„ๆ˜พๅกๆฅๆ”ฏๆŒๆ‚จ่ฎญ็ปƒ")
114
+ default_batch_size = 1
115
+ gpus = "-".join([i[0] for i in gpu_infos])
116
+
117
+
118
+ class ToolButton(gr.Button, gr.components.FormComponent):
119
+ """Small button with single emoji as text, fits inside gradio forms"""
120
+
121
+ def __init__(self, **kwargs):
122
+ super().__init__(variant="tool", **kwargs)
123
+
124
+ def get_block_name(self):
125
+ return "button"
126
+
127
+
128
+ weight_root = os.getenv("weight_root")
129
+ weight_uvr5_root = os.getenv("weight_uvr5_root")
130
+ index_root = os.getenv("index_root")
131
+
132
+ names = []
133
+ for name in os.listdir(weight_root):
134
+ if name.endswith(".pth"):
135
+ names.append(name)
136
+ index_paths = []
137
+ for root, dirs, files in os.walk(index_root, topdown=False):
138
+ for name in files:
139
+ if name.endswith(".index") and "trained" not in name:
140
+ index_paths.append("%s/%s" % (root, name))
141
+ uvr5_names = []
142
+ for name in os.listdir(weight_uvr5_root):
143
+ if name.endswith(".pth") or "onnx" in name:
144
+ uvr5_names.append(name.replace(".pth", ""))
145
+
146
+
147
+ def change_choices():
148
+ names = []
149
+ for name in os.listdir(weight_root):
150
+ if name.endswith(".pth"):
151
+ names.append(name)
152
+ index_paths = []
153
+ for root, dirs, files in os.walk(index_root, topdown=False):
154
+ for name in files:
155
+ if name.endswith(".index") and "trained" not in name:
156
+ index_paths.append("%s/%s" % (root, name))
157
+ audio_files=[]
158
+ for filename in os.listdir("./audios"):
159
+ if filename.endswith(('.wav','.mp3','.ogg')):
160
+ audio_files.append('./audios/'+filename)
161
+ return {"choices": sorted(names), "__type__": "update"}, {
162
+ "choices": sorted(index_paths),
163
+ "__type__": "update",
164
+ }, {"choices": sorted(audio_files), "__type__": "update"}
165
+
166
+ def clean():
167
+ return {"value": "", "__type__": "update"}
168
+
169
+
170
+ def export_onnx():
171
+ from infer.modules.onnx.export import export_onnx as eo
172
+
173
+ eo()
174
+
175
+
176
+ sr_dict = {
177
+ "32k": 32000,
178
+ "40k": 40000,
179
+ "48k": 48000,
180
+ }
181
+
182
+
183
+ def if_done(done, p):
184
+ while 1:
185
+ if p.poll() is None:
186
+ sleep(0.5)
187
+ else:
188
+ break
189
+ done[0] = True
190
+
191
+
192
+ def if_done_multi(done, ps):
193
+ while 1:
194
+ # poll==Noneไปฃ่กจ่ฟ›็จ‹ๆœช็ป“ๆŸ
195
+ # ๅช่ฆๆœ‰ไธ€ไธช่ฟ›็จ‹ๆœช็ป“ๆŸ้ƒฝไธๅœ
196
+ flag = 1
197
+ for p in ps:
198
+ if p.poll() is None:
199
+ flag = 0
200
+ sleep(0.5)
201
+ break
202
+ if flag == 1:
203
+ break
204
+ done[0] = True
205
+
206
+
207
+ def preprocess_dataset(trainset_dir, exp_dir, sr, n_p):
208
+ sr = sr_dict[sr]
209
+ os.makedirs("%s/logs/%s" % (now_dir, exp_dir), exist_ok=True)
210
+ f = open("%s/logs/%s/preprocess.log" % (now_dir, exp_dir), "w")
211
+ f.close()
212
+ per = 3.0 if config.is_half else 3.7
213
+ cmd = '"%s" infer/modules/train/preprocess.py "%s" %s %s "%s/logs/%s" %s %.1f' % (
214
+ config.python_cmd,
215
+ trainset_dir,
216
+ sr,
217
+ n_p,
218
+ now_dir,
219
+ exp_dir,
220
+ config.noparallel,
221
+ per,
222
+ )
223
+ logger.info(cmd)
224
+ p = Popen(cmd, shell=True) # , stdin=PIPE, stdout=PIPE,stderr=PIPE,cwd=now_dir
225
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
226
+ done = [False]
227
+ threading.Thread(
228
+ target=if_done,
229
+ args=(
230
+ done,
231
+ p,
232
+ ),
233
+ ).start()
234
+ while 1:
235
+ with open("%s/logs/%s/preprocess.log" % (now_dir, exp_dir), "r") as f:
236
+ yield (f.read())
237
+ sleep(1)
238
+ if done[0]:
239
+ break
240
+ with open("%s/logs/%s/preprocess.log" % (now_dir, exp_dir), "r") as f:
241
+ log = f.read()
242
+ logger.info(log)
243
+ yield log
244
+
245
+
246
+ # but2.click(extract_f0,[gpus6,np7,f0method8,if_f0_3,trainset_dir4],[info2])
247
+ def extract_f0_feature(gpus, n_p, f0method, if_f0, exp_dir, version19, gpus_rmvpe):
248
+ gpus = gpus.split("-")
249
+ os.makedirs("%s/logs/%s" % (now_dir, exp_dir), exist_ok=True)
250
+ f = open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "w")
251
+ f.close()
252
+ if if_f0:
253
+ if f0method != "rmvpe_gpu":
254
+ cmd = (
255
+ '"%s" infer/modules/train/extract/extract_f0_print.py "%s/logs/%s" %s %s'
256
+ % (
257
+ config.python_cmd,
258
+ now_dir,
259
+ exp_dir,
260
+ n_p,
261
+ f0method,
262
+ )
263
+ )
264
+ logger.info(cmd)
265
+ p = Popen(
266
+ cmd, shell=True, cwd=now_dir
267
+ ) # , stdin=PIPE, stdout=PIPE,stderr=PIPE
268
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
269
+ done = [False]
270
+ threading.Thread(
271
+ target=if_done,
272
+ args=(
273
+ done,
274
+ p,
275
+ ),
276
+ ).start()
277
+ else:
278
+ if gpus_rmvpe != "-":
279
+ gpus_rmvpe = gpus_rmvpe.split("-")
280
+ leng = len(gpus_rmvpe)
281
+ ps = []
282
+ for idx, n_g in enumerate(gpus_rmvpe):
283
+ cmd = (
284
+ '"%s" infer/modules/train/extract/extract_f0_rmvpe.py %s %s %s "%s/logs/%s" %s '
285
+ % (
286
+ config.python_cmd,
287
+ leng,
288
+ idx,
289
+ n_g,
290
+ now_dir,
291
+ exp_dir,
292
+ config.is_half,
293
+ )
294
+ )
295
+ logger.info(cmd)
296
+ p = Popen(
297
+ cmd, shell=True, cwd=now_dir
298
+ ) # , shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=now_dir
299
+ ps.append(p)
300
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
301
+ done = [False]
302
+ threading.Thread(
303
+ target=if_done_multi, #
304
+ args=(
305
+ done,
306
+ ps,
307
+ ),
308
+ ).start()
309
+ else:
310
+ cmd = (
311
+ config.python_cmd
312
+ + ' infer/modules/train/extract/extract_f0_rmvpe_dml.py "%s/logs/%s" '
313
+ % (
314
+ now_dir,
315
+ exp_dir,
316
+ )
317
+ )
318
+ logger.info(cmd)
319
+ p = Popen(
320
+ cmd, shell=True, cwd=now_dir
321
+ ) # , shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=now_dir
322
+ p.wait()
323
+ done = [True]
324
+ while 1:
325
+ with open(
326
+ "%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r"
327
+ ) as f:
328
+ yield (f.read())
329
+ sleep(1)
330
+ if done[0]:
331
+ break
332
+ with open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r") as f:
333
+ log = f.read()
334
+ logger.info(log)
335
+ yield log
336
+ ####ๅฏนไธๅŒpartๅˆ†ๅˆซๅผ€ๅคš่ฟ›็จ‹
337
+ """
338
+ n_part=int(sys.argv[1])
339
+ i_part=int(sys.argv[2])
340
+ i_gpu=sys.argv[3]
341
+ exp_dir=sys.argv[4]
342
+ os.environ["CUDA_VISIBLE_DEVICES"]=str(i_gpu)
343
+ """
344
+ leng = len(gpus)
345
+ ps = []
346
+ for idx, n_g in enumerate(gpus):
347
+ cmd = (
348
+ '"%s" infer/modules/train/extract_feature_print.py %s %s %s %s "%s/logs/%s" %s'
349
+ % (
350
+ config.python_cmd,
351
+ config.device,
352
+ leng,
353
+ idx,
354
+ n_g,
355
+ now_dir,
356
+ exp_dir,
357
+ version19,
358
+ )
359
+ )
360
+ logger.info(cmd)
361
+ p = Popen(
362
+ cmd, shell=True, cwd=now_dir
363
+ ) # , shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=now_dir
364
+ ps.append(p)
365
+ ###็…ž็ฌ”gr, popen read้ƒฝ้žๅพ—ๅ…จ่ท‘ๅฎŒไบ†ๅ†ไธ€ๆฌกๆ€ง่ฏปๅ–, ไธ็”จgrๅฐฑๆญฃๅธธ่ฏปไธ€ๅฅ่พ“ๅ‡บไธ€ๅฅ;ๅช่ƒฝ้ขๅค–ๅผ„ๅ‡บไธ€ไธชๆ–‡ๆœฌๆตๅฎšๆ—ถ่ฏป
366
+ done = [False]
367
+ threading.Thread(
368
+ target=if_done_multi,
369
+ args=(
370
+ done,
371
+ ps,
372
+ ),
373
+ ).start()
374
+ while 1:
375
+ with open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r") as f:
376
+ yield (f.read())
377
+ sleep(1)
378
+ if done[0]:
379
+ break
380
+ with open("%s/logs/%s/extract_f0_feature.log" % (now_dir, exp_dir), "r") as f:
381
+ log = f.read()
382
+ logger.info(log)
383
+ yield log
384
+
385
+
386
+ def get_pretrained_models(path_str, f0_str, sr2):
387
+ if_pretrained_generator_exist = os.access(
388
+ "assets/pretrained%s/%sG%s.pth" % (path_str, f0_str, sr2), os.F_OK
389
+ )
390
+ if_pretrained_discriminator_exist = os.access(
391
+ "assets/pretrained%s/%sD%s.pth" % (path_str, f0_str, sr2), os.F_OK
392
+ )
393
+ if not if_pretrained_generator_exist:
394
+ logger.warn(
395
+ "assets/pretrained%s/%sG%s.pth not exist, will not use pretrained model",
396
+ path_str,
397
+ f0_str,
398
+ sr2,
399
+ )
400
+ if not if_pretrained_discriminator_exist:
401
+ logger.warn(
402
+ "assets/pretrained%s/%sD%s.pth not exist, will not use pretrained model",
403
+ path_str,
404
+ f0_str,
405
+ sr2,
406
+ )
407
+ return (
408
+ "assets/pretrained%s/%sG%s.pth" % (path_str, f0_str, sr2)
409
+ if if_pretrained_generator_exist
410
+ else "",
411
+ "assets/pretrained%s/%sD%s.pth" % (path_str, f0_str, sr2)
412
+ if if_pretrained_discriminator_exist
413
+ else "",
414
+ )
415
+
416
+
417
+ def change_sr2(sr2, if_f0_3, version19):
418
+ path_str = "" if version19 == "v1" else "_v2"
419
+ f0_str = "f0" if if_f0_3 else ""
420
+ return get_pretrained_models(path_str, f0_str, sr2)
421
+
422
+
423
+ def change_version19(sr2, if_f0_3, version19):
424
+ path_str = "" if version19 == "v1" else "_v2"
425
+ if sr2 == "32k" and version19 == "v1":
426
+ sr2 = "40k"
427
+ to_return_sr2 = (
428
+ {"choices": ["40k", "48k"], "__type__": "update", "value": sr2}
429
+ if version19 == "v1"
430
+ else {"choices": ["40k", "48k", "32k"], "__type__": "update", "value": sr2}
431
+ )
432
+ f0_str = "f0" if if_f0_3 else ""
433
+ return (
434
+ *get_pretrained_models(path_str, f0_str, sr2),
435
+ to_return_sr2,
436
+ )
437
+
438
+
439
+ def change_f0(if_f0_3, sr2, version19): # f0method8,pretrained_G14,pretrained_D15
440
+ path_str = "" if version19 == "v1" else "_v2"
441
+ return (
442
+ {"visible": if_f0_3, "__type__": "update"},
443
+ *get_pretrained_models(path_str, "f0", sr2),
444
+ )
445
+
446
+
447
+ # but3.click(click_train,[exp_dir1,sr2,if_f0_3,save_epoch10,total_epoch11,batch_size12,if_save_latest13,pretrained_G14,pretrained_D15,gpus16])
448
+ def click_train(
449
+ exp_dir1,
450
+ sr2,
451
+ if_f0_3,
452
+ spk_id5,
453
+ save_epoch10,
454
+ total_epoch11,
455
+ batch_size12,
456
+ if_save_latest13,
457
+ pretrained_G14,
458
+ pretrained_D15,
459
+ gpus16,
460
+ if_cache_gpu17,
461
+ if_save_every_weights18,
462
+ version19,
463
+ ):
464
+ # ็”Ÿๆˆfilelist
465
+ exp_dir = "%s/logs/%s" % (now_dir, exp_dir1)
466
+ os.makedirs(exp_dir, exist_ok=True)
467
+ gt_wavs_dir = "%s/0_gt_wavs" % (exp_dir)
468
+ feature_dir = (
469
+ "%s/3_feature256" % (exp_dir)
470
+ if version19 == "v1"
471
+ else "%s/3_feature768" % (exp_dir)
472
+ )
473
+ if if_f0_3:
474
+ f0_dir = "%s/2a_f0" % (exp_dir)
475
+ f0nsf_dir = "%s/2b-f0nsf" % (exp_dir)
476
+ names = (
477
+ set([name.split(".")[0] for name in os.listdir(gt_wavs_dir)])
478
+ & set([name.split(".")[0] for name in os.listdir(feature_dir)])
479
+ & set([name.split(".")[0] for name in os.listdir(f0_dir)])
480
+ & set([name.split(".")[0] for name in os.listdir(f0nsf_dir)])
481
+ )
482
+ else:
483
+ names = set([name.split(".")[0] for name in os.listdir(gt_wavs_dir)]) & set(
484
+ [name.split(".")[0] for name in os.listdir(feature_dir)]
485
+ )
486
+ opt = []
487
+ for name in names:
488
+ if if_f0_3:
489
+ opt.append(
490
+ "%s/%s.wav|%s/%s.npy|%s/%s.wav.npy|%s/%s.wav.npy|%s"
491
+ % (
492
+ gt_wavs_dir.replace("\\", "\\\\"),
493
+ name,
494
+ feature_dir.replace("\\", "\\\\"),
495
+ name,
496
+ f0_dir.replace("\\", "\\\\"),
497
+ name,
498
+ f0nsf_dir.replace("\\", "\\\\"),
499
+ name,
500
+ spk_id5,
501
+ )
502
+ )
503
+ else:
504
+ opt.append(
505
+ "%s/%s.wav|%s/%s.npy|%s"
506
+ % (
507
+ gt_wavs_dir.replace("\\", "\\\\"),
508
+ name,
509
+ feature_dir.replace("\\", "\\\\"),
510
+ name,
511
+ spk_id5,
512
+ )
513
+ )
514
+ fea_dim = 256 if version19 == "v1" else 768
515
+ if if_f0_3:
516
+ for _ in range(2):
517
+ opt.append(
518
+ "%s/logs/mute/0_gt_wavs/mute%s.wav|%s/logs/mute/3_feature%s/mute.npy|%s/logs/mute/2a_f0/mute.wav.npy|%s/logs/mute/2b-f0nsf/mute.wav.npy|%s"
519
+ % (now_dir, sr2, now_dir, fea_dim, now_dir, now_dir, spk_id5)
520
+ )
521
+ else:
522
+ for _ in range(2):
523
+ opt.append(
524
+ "%s/logs/mute/0_gt_wavs/mute%s.wav|%s/logs/mute/3_feature%s/mute.npy|%s"
525
+ % (now_dir, sr2, now_dir, fea_dim, spk_id5)
526
+ )
527
+ shuffle(opt)
528
+ with open("%s/filelist.txt" % exp_dir, "w") as f:
529
+ f.write("\n".join(opt))
530
+ logger.debug("Write filelist done")
531
+ # ็”Ÿๆˆconfig#ๆ— ้œ€็”Ÿๆˆconfig
532
+ # cmd = python_cmd + " train_nsf_sim_cache_sid_load_pretrain.py -e mi-test -sr 40k -f0 1 -bs 4 -g 0 -te 10 -se 5 -pg pretrained/f0G40k.pth -pd pretrained/f0D40k.pth -l 1 -c 0"
533
+ logger.info("Use gpus: %s", str(gpus16))
534
+ if pretrained_G14 == "":
535
+ logger.info("No pretrained Generator")
536
+ if pretrained_D15 == "":
537
+ logger.info("No pretrained Discriminator")
538
+ if version19 == "v1" or sr2 == "40k":
539
+ config_path = "v1/%s.json" % sr2
540
+ else:
541
+ config_path = "v2/%s.json" % sr2
542
+ config_save_path = os.path.join(exp_dir, "config.json")
543
+ if not pathlib.Path(config_save_path).exists():
544
+ with open(config_save_path, "w", encoding="utf-8") as f:
545
+ json.dump(
546
+ config.json_config[config_path],
547
+ f,
548
+ ensure_ascii=False,
549
+ indent=4,
550
+ sort_keys=True,
551
+ )
552
+ f.write("\n")
553
+ if gpus16:
554
+ cmd = (
555
+ '"%s" infer/modules/train/train.py -e "%s" -sr %s -f0 %s -bs %s -g %s -te %s -se %s %s %s -l %s -c %s -sw %s -v %s'
556
+ % (
557
+ config.python_cmd,
558
+ exp_dir1,
559
+ sr2,
560
+ 1 if if_f0_3 else 0,
561
+ batch_size12,
562
+ gpus16,
563
+ total_epoch11,
564
+ save_epoch10,
565
+ "-pg %s" % pretrained_G14 if pretrained_G14 != "" else "",
566
+ "-pd %s" % pretrained_D15 if pretrained_D15 != "" else "",
567
+ 1 if if_save_latest13 == i18n("ๆ˜ฏ") else 0,
568
+ 1 if if_cache_gpu17 == i18n("ๆ˜ฏ") else 0,
569
+ 1 if if_save_every_weights18 == i18n("ๆ˜ฏ") else 0,
570
+ version19,
571
+ )
572
+ )
573
+ else:
574
+ cmd = (
575
+ '"%s" infer/modules/train/train.py -e "%s" -sr %s -f0 %s -bs %s -te %s -se %s %s %s -l %s -c %s -sw %s -v %s'
576
+ % (
577
+ config.python_cmd,
578
+ exp_dir1,
579
+ sr2,
580
+ 1 if if_f0_3 else 0,
581
+ batch_size12,
582
+ total_epoch11,
583
+ save_epoch10,
584
+ "-pg %s" % pretrained_G14 if pretrained_G14 != "" else "",
585
+ "-pd %s" % pretrained_D15 if pretrained_D15 != "" else "",
586
+ 1 if if_save_latest13 == i18n("ๆ˜ฏ") else 0,
587
+ 1 if if_cache_gpu17 == i18n("ๆ˜ฏ") else 0,
588
+ 1 if if_save_every_weights18 == i18n("ๆ˜ฏ") else 0,
589
+ version19,
590
+ )
591
+ )
592
+ logger.info(cmd)
593
+ p = Popen(cmd, shell=True, cwd=now_dir)
594
+ p.wait()
595
+ return "่ฎญ็ปƒ็ป“ๆŸ, ๆ‚จๅฏๆŸฅ็œ‹ๆŽงๅˆถๅฐ่ฎญ็ปƒๆ—ฅๅฟ—ๆˆ–ๅฎž้ชŒๆ–‡ไปถๅคนไธ‹็š„train.log"
596
+
597
+
598
+ # but4.click(train_index, [exp_dir1], info3)
599
+ def train_index(exp_dir1, version19):
600
+ # exp_dir = "%s/logs/%s" % (now_dir, exp_dir1)
601
+ exp_dir = "logs/%s" % (exp_dir1)
602
+ os.makedirs(exp_dir, exist_ok=True)
603
+ feature_dir = (
604
+ "%s/3_feature256" % (exp_dir)
605
+ if version19 == "v1"
606
+ else "%s/3_feature768" % (exp_dir)
607
+ )
608
+ if not os.path.exists(feature_dir):
609
+ return "่ฏทๅ…ˆ่ฟ›่กŒ็‰นๅพๆๅ–!"
610
+ listdir_res = list(os.listdir(feature_dir))
611
+ if len(listdir_res) == 0:
612
+ return "่ฏทๅ…ˆ่ฟ›่กŒ็‰นๅพๆๅ–๏ผ"
613
+ infos = []
614
+ npys = []
615
+ for name in sorted(listdir_res):
616
+ phone = np.load("%s/%s" % (feature_dir, name))
617
+ npys.append(phone)
618
+ big_npy = np.concatenate(npys, 0)
619
+ big_npy_idx = np.arange(big_npy.shape[0])
620
+ np.random.shuffle(big_npy_idx)
621
+ big_npy = big_npy[big_npy_idx]
622
+ if big_npy.shape[0] > 2e5:
623
+ infos.append("Trying doing kmeans %s shape to 10k centers." % big_npy.shape[0])
624
+ yield "\n".join(infos)
625
+ try:
626
+ big_npy = (
627
+ MiniBatchKMeans(
628
+ n_clusters=10000,
629
+ verbose=True,
630
+ batch_size=256 * config.n_cpu,
631
+ compute_labels=False,
632
+ init="random",
633
+ )
634
+ .fit(big_npy)
635
+ .cluster_centers_
636
+ )
637
+ except:
638
+ info = traceback.format_exc()
639
+ logger.info(info)
640
+ infos.append(info)
641
+ yield "\n".join(infos)
642
+
643
+ np.save("%s/total_fea.npy" % exp_dir, big_npy)
644
+ n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
645
+ infos.append("%s,%s" % (big_npy.shape, n_ivf))
646
+ yield "\n".join(infos)
647
+ index = faiss.index_factory(256 if version19 == "v1" else 768, "IVF%s,Flat" % n_ivf)
648
+ # index = faiss.index_factory(256if version19=="v1"else 768, "IVF%s,PQ128x4fs,RFlat"%n_ivf)
649
+ infos.append("training")
650
+ yield "\n".join(infos)
651
+ index_ivf = faiss.extract_index_ivf(index) #
652
+ index_ivf.nprobe = 1
653
+ index.train(big_npy)
654
+ faiss.write_index(
655
+ index,
656
+ "%s/trained_IVF%s_Flat_nprobe_%s_%s_%s.index"
657
+ % (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
658
+ )
659
+
660
+ infos.append("adding")
661
+ yield "\n".join(infos)
662
+ batch_size_add = 8192
663
+ for i in range(0, big_npy.shape[0], batch_size_add):
664
+ index.add(big_npy[i : i + batch_size_add])
665
+ faiss.write_index(
666
+ index,
667
+ "%s/added_IVF%s_Flat_nprobe_%s_%s_%s.index"
668
+ % (exp_dir, n_ivf, index_ivf.nprobe, exp_dir1, version19),
669
+ )
670
+ infos.append(
671
+ "ๆˆๅŠŸๆž„ๅปบ็ดขๅผ•๏ผŒadded_IVF%s_Flat_nprobe_%s_%s_%s.index"
672
+ % (n_ivf, index_ivf.nprobe, exp_dir1, version19)
673
+ )
674
+ # faiss.write_index(index, '%s/added_IVF%s_Flat_FastScan_%s.index'%(exp_dir,n_ivf,version19))
675
+ # infos.append("ๆˆๅŠŸๆž„ๅปบ็ดขๅผ•๏ผŒadded_IVF%s_Flat_FastScan_%s.index"%(n_ivf,version19))
676
+ yield "\n".join(infos)
677
+
678
+
679
+ # but5.click(train1key, [exp_dir1, sr2, if_f0_3, trainset_dir4, spk_id5, gpus6, np7, f0method8, save_epoch10, total_epoch11, batch_size12, if_save_latest13, pretrained_G14, pretrained_D15, gpus16, if_cache_gpu17], info3)
680
+ def train1key(
681
+ exp_dir1,
682
+ sr2,
683
+ if_f0_3,
684
+ trainset_dir4,
685
+ spk_id5,
686
+ np7,
687
+ f0method8,
688
+ save_epoch10,
689
+ total_epoch11,
690
+ batch_size12,
691
+ if_save_latest13,
692
+ pretrained_G14,
693
+ pretrained_D15,
694
+ gpus16,
695
+ if_cache_gpu17,
696
+ if_save_every_weights18,
697
+ version19,
698
+ gpus_rmvpe,
699
+ ):
700
+ infos = []
701
+
702
+ def get_info_str(strr):
703
+ infos.append(strr)
704
+ return "\n".join(infos)
705
+
706
+ ####### step1:ๅค„็†ๆ•ฐๆฎ
707
+ yield get_info_str(i18n("step1:ๆญฃๅœจๅค„็†ๆ•ฐๆฎ"))
708
+ [get_info_str(_) for _ in preprocess_dataset(trainset_dir4, exp_dir1, sr2, np7)]
709
+
710
+ ####### step2a:ๆๅ–้Ÿณ้ซ˜
711
+ yield get_info_str(i18n("step2:ๆญฃๅœจๆๅ–้Ÿณ้ซ˜&ๆญฃๅœจๆๅ–็‰นๅพ"))
712
+ [
713
+ get_info_str(_)
714
+ for _ in extract_f0_feature(
715
+ gpus16, np7, f0method8, if_f0_3, exp_dir1, version19, gpus_rmvpe
716
+ )
717
+ ]
718
+
719
+ ####### step3a:่ฎญ็ปƒๆจกๅž‹
720
+ yield get_info_str(i18n("step3a:ๆญฃๅœจ่ฎญ็ปƒๆจกๅž‹"))
721
+ click_train(
722
+ exp_dir1,
723
+ sr2,
724
+ if_f0_3,
725
+ spk_id5,
726
+ save_epoch10,
727
+ total_epoch11,
728
+ batch_size12,
729
+ if_save_latest13,
730
+ pretrained_G14,
731
+ pretrained_D15,
732
+ gpus16,
733
+ if_cache_gpu17,
734
+ if_save_every_weights18,
735
+ version19,
736
+ )
737
+ yield get_info_str(i18n("่ฎญ็ปƒ็ป“ๆŸ, ๆ‚จๅฏๆŸฅ็œ‹ๆŽงๅˆถๅฐ่ฎญ็ปƒๆ—ฅๅฟ—ๆˆ–ๅฎž้ชŒๆ–‡ไปถๅคนไธ‹็š„train.log"))
738
+
739
+ ####### step3b:่ฎญ็ปƒ็ดขๅผ•
740
+ [get_info_str(_) for _ in train_index(exp_dir1, version19)]
741
+ yield get_info_str(i18n("ๅ…จๆต็จ‹็ป“ๆŸ๏ผ"))
742
+
743
+
744
+ # ckpt_path2.change(change_info_,[ckpt_path2],[sr__,if_f0__])
745
+ def change_info_(ckpt_path):
746
+ if not os.path.exists(ckpt_path.replace(os.path.basename(ckpt_path), "train.log")):
747
+ return {"__type__": "update"}, {"__type__": "update"}, {"__type__": "update"}
748
+ try:
749
+ with open(
750
+ ckpt_path.replace(os.path.basename(ckpt_path), "train.log"), "r"
751
+ ) as f:
752
+ info = eval(f.read().strip("\n").split("\n")[0].split("\t")[-1])
753
+ sr, f0 = info["sample_rate"], info["if_f0"]
754
+ version = "v2" if ("version" in info and info["version"] == "v2") else "v1"
755
+ return sr, str(f0), version
756
+ except:
757
+ traceback.print_exc()
758
+ return {"__type__": "update"}, {"__type__": "update"}, {"__type__": "update"}
759
+
760
+
761
+ F0GPUVisible = config.dml == False
762
+
763
+
764
+ def change_f0_method(f0method8):
765
+ if f0method8 == "rmvpe_gpu":
766
+ visible = F0GPUVisible
767
+ else:
768
+ visible = False
769
+ return {"visible": visible, "__type__": "update"}
770
+
771
+ def find_model():
772
+ if len(names) > 0:
773
+ vc.get_vc(sorted(names)[0],None,None)
774
+ return sorted(names)[0]
775
+ else:
776
+ try:
777
+ gr.Info("Do not forget to choose a model.")
778
+ except:
779
+ pass
780
+ return ''
781
+
782
+ def find_audios(index=False):
783
+ audio_files=[]
784
+ if not os.path.exists('./audios'): os.mkdir("./audios")
785
+ for filename in os.listdir("./audios"):
786
+ if filename.endswith(('.wav','.mp3','.ogg')):
787
+ audio_files.append("./audios/"+filename)
788
+ if index:
789
+ if len(audio_files) > 0: return sorted(audio_files)[0]
790
+ else: return ""
791
+ elif len(audio_files) > 0: return sorted(audio_files)
792
+ else: return []
793
+
794
+ def get_index():
795
+ if find_model() != '':
796
+ chosen_model=sorted(names)[0].split(".")[0]
797
+ logs_path="./logs/"+chosen_model
798
+ if os.path.exists(logs_path):
799
+ for file in os.listdir(logs_path):
800
+ if file.endswith(".index"):
801
+ return os.path.join(logs_path, file)
802
+ return ''
803
+ else:
804
+ return ''
805
+
806
+ def get_indexes():
807
+ indexes_list=[]
808
+ for dirpath, dirnames, filenames in os.walk("./logs/"):
809
+ for filename in filenames:
810
+ if filename.endswith(".index"):
811
+ indexes_list.append(os.path.join(dirpath,filename))
812
+ if len(indexes_list) > 0:
813
+ return indexes_list
814
+ else:
815
+ return ''
816
+
817
+ def save_wav(file):
818
+ try:
819
+ file_path=file.name
820
+ shutil.move(file_path,'./audios')
821
+ return './audios/'+os.path.basename(file_path)
822
+ except AttributeError:
823
+ try:
824
+ new_name = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")+'.wav'
825
+ new_path='./audios/'+new_name
826
+ shutil.move(file,new_path)
827
+ return new_path
828
+ except TypeError:
829
+ return None
830
+
831
+ def download_from_url(url, model):
832
+ if url == '':
833
+ return "URL cannot be left empty."
834
+ if model =='':
835
+ return "You need to name your model. For example: My-Model"
836
+ url = url.strip()
837
+ zip_dirs = ["zips", "unzips"]
838
+ for directory in zip_dirs:
839
+ if os.path.exists(directory):
840
+ shutil.rmtree(directory)
841
+ os.makedirs("zips", exist_ok=True)
842
+ os.makedirs("unzips", exist_ok=True)
843
+ zipfile = model + '.zip'
844
+ zipfile_path = './zips/' + zipfile
845
+ try:
846
+ if "drive.google.com" in url:
847
+ subprocess.run(["gdown", url, "--fuzzy", "-O", zipfile_path])
848
+ elif "mega.nz" in url:
849
+ m = Mega()
850
+ m.download_url(url, './zips')
851
+ else:
852
+ subprocess.run(["wget", url, "-O", zipfile_path])
853
+ for filename in os.listdir("./zips"):
854
+ if filename.endswith(".zip"):
855
+ zipfile_path = os.path.join("./zips/",filename)
856
+ shutil.unpack_archive(zipfile_path, "./unzips", 'zip')
857
+ else:
858
+ return "No zipfile found."
859
+ for root, dirs, files in os.walk('./unzips'):
860
+ for file in files:
861
+ file_path = os.path.join(root, file)
862
+ if file.endswith(".index"):
863
+ os.mkdir(f'./logs/{model}')
864
+ shutil.copy2(file_path,f'./logs/{model}')
865
+ elif "G_" not in file and "D_" not in file and file.endswith(".pth"):
866
+ shutil.copy(file_path,f'./assets/weights/{model}.pth')
867
+ shutil.rmtree("zips")
868
+ shutil.rmtree("unzips")
869
+ return "Success."
870
+ except:
871
+ return "There's been an error."
872
+
873
+ def upload_to_dataset(files, dir):
874
+ if dir == '':
875
+ dir = './dataset/'+datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
876
+ if not os.path.exists(dir):
877
+ os.makedirs(dir)
878
+ for file in files:
879
+ path=file.name
880
+ shutil.copy2(path,dir)
881
+ try:
882
+ gr.Info(i18n("ๅค„็†ๆ•ฐๆฎ"))
883
+ except:
884
+ pass
885
+ return i18n("ๅค„็†ๆ•ฐๆฎ"), {"value":dir,"__type__":"update"}
886
+
887
+ def download_model_files(model):
888
+ model_found = False
889
+ index_found = False
890
+ if os.path.exists(f'./assets/weights/{model}.pth'): model_found = True
891
+ if os.path.exists(f'./logs/{model}'):
892
+ for file in os.listdir(f'./logs/{model}'):
893
+ if file.endswith('.index') and 'added' in file:
894
+ log_file = file
895
+ index_found = True
896
+ if model_found and index_found:
897
+ return [f'./assets/weights/{model}.pth', f'./logs/{model}/{log_file}'], "Done"
898
+ elif model_found and not index_found:
899
+ return f'./assets/weights/{model}.pth', "Could not find Index file."
900
+ elif index_found and not model_found:
901
+ return f'./logs/{model}/{log_file}', f'Make sure the Voice Name is correct. I could not find {model}.pth'
902
+ else:
903
+ return None, f'Could not find {model}.pth or corresponding Index file.'
904
+
905
+ with gr.Blocks(title="๐Ÿ”Š",theme=gr.themes.Base(primary_hue="rose",neutral_hue="zinc")) as app:
906
+ with gr.Row():
907
+ gr.HTML("<img src='file/a.png' alt='image'>")
908
+ with gr.Tabs():
909
+ with gr.TabItem(i18n("ๆจกๅž‹ๆŽจ็†")):
910
+ with gr.Row():
911
+ sid0 = gr.Dropdown(label=i18n("ๆŽจ็†้Ÿณ่‰ฒ"), choices=sorted(names), value=find_model())
912
+ refresh_button = gr.Button(i18n("ๅˆทๆ–ฐ้Ÿณ่‰ฒๅˆ—่กจๅ’Œ็ดขๅผ•่ทฏๅพ„"), variant="primary")
913
+ #clean_button = gr.Button(i18n("ๅธ่ฝฝ้Ÿณ่‰ฒ็œๆ˜พๅญ˜"), variant="primary")
914
+ spk_item = gr.Slider(
915
+ minimum=0,
916
+ maximum=2333,
917
+ step=1,
918
+ label=i18n("่ฏท้€‰ๆ‹ฉ่ฏด่ฏไบบid"),
919
+ value=0,
920
+ visible=False,
921
+ interactive=True,
922
+ )
923
+ #clean_button.click(
924
+ # fn=clean, inputs=[], outputs=[sid0], api_name="infer_clean"
925
+ #)
926
+ vc_transform0 = gr.Number(
927
+ label=i18n("ๅ˜่ฐƒ(ๆ•ดๆ•ฐ, ๅŠ้Ÿณๆ•ฐ้‡, ๅ‡ๅ…ซๅบฆ12้™ๅ…ซๅบฆ-12)"), value=0
928
+ )
929
+ but0 = gr.Button(i18n("่ฝฌๆข"), variant="primary")
930
+ with gr.Row():
931
+ with gr.Column():
932
+ with gr.Row():
933
+ dropbox = gr.File(label="Drop your audio here & hit the Reload button.")
934
+ with gr.Row():
935
+ record_button=gr.Audio(source="microphone", label="OR Record audio.", type="filepath")
936
+ with gr.Row():
937
+ input_audio0 = gr.Dropdown(
938
+ label=i18n("่พ“ๅ…ฅๅพ…ๅค„็†้Ÿณ้ข‘ๆ–‡ไปถ่ทฏๅพ„(้ป˜่ฎคๆ˜ฏๆญฃ็กฎๆ ผๅผ็คบไพ‹)"),
939
+ value=find_audios(True),
940
+ choices=find_audios()
941
+ )
942
+ record_button.change(fn=save_wav, inputs=[record_button], outputs=[input_audio0])
943
+ dropbox.upload(fn=save_wav, inputs=[dropbox], outputs=[input_audio0])
944
+ with gr.Column():
945
+ with gr.Accordion(label=i18n("่‡ชๅŠจๆฃ€ๆต‹index่ทฏๅพ„,ไธ‹ๆ‹‰ๅผ้€‰ๆ‹ฉ(dropdown)"), open=False):
946
+ file_index2 = gr.Dropdown(
947
+ label=i18n("่‡ชๅŠจๆฃ€ๆต‹index่ทฏๅพ„,ไธ‹ๆ‹‰ๅผ้€‰ๆ‹ฉ(dropdown)"),
948
+ choices=get_indexes(),
949
+ interactive=True,
950
+ value=get_index()
951
+ )
952
+ index_rate1 = gr.Slider(
953
+ minimum=0,
954
+ maximum=1,
955
+ label=i18n("ๆฃ€็ดข็‰นๅพๅ ๆฏ”"),
956
+ value=0.66,
957
+ interactive=True,
958
+ )
959
+ vc_output2 = gr.Audio(label=i18n("่พ“ๅ‡บ้Ÿณ้ข‘(ๅณไธ‹่ง’ไธ‰ไธช็‚น,็‚นไบ†ๅฏไปฅไธ‹่ฝฝ)"))
960
+ with gr.Accordion(label=i18n("ๅธธ่ง„่ฎพ็ฝฎ"), open=False):
961
+ f0method0 = gr.Radio(
962
+ label=i18n(
963
+ "้€‰ๆ‹ฉ้Ÿณ้ซ˜ๆๅ–็ฎ—ๆณ•,่พ“ๅ…ฅๆญŒๅฃฐๅฏ็”จpmๆ้€Ÿ,harvestไฝŽ้Ÿณๅฅฝไฝ†ๅทจๆ…ขๆ— ๆฏ”,crepeๆ•ˆๆžœๅฅฝไฝ†ๅƒGPU,rmvpeๆ•ˆๆžœๆœ€ๅฅฝไธ”ๅพฎๅƒGPU"
964
+ ),
965
+ choices=["pm", "harvest", "crepe", "rmvpe"]
966
+ if config.dml == False
967
+ else ["pm", "harvest", "rmvpe"],
968
+ value="rmvpe",
969
+ interactive=True,
970
+ )
971
+ filter_radius0 = gr.Slider(
972
+ minimum=0,
973
+ maximum=7,
974
+ label=i18n(">=3ๅˆ™ไฝฟ็”จๅฏนharvest้Ÿณ้ซ˜่ฏ†ๅˆซ็š„็ป“ๆžœไฝฟ็”จไธญๅ€ผๆปคๆณข๏ผŒๆ•ฐๅ€ผไธบๆปคๆณขๅŠๅพ„๏ผŒไฝฟ็”จๅฏไปฅๅ‰Šๅผฑๅ“‘้Ÿณ"),
975
+ value=3,
976
+ step=1,
977
+ interactive=True,
978
+ )
979
+ resample_sr0 = gr.Slider(
980
+ minimum=0,
981
+ maximum=48000,
982
+ label=i18n("ๅŽๅค„็†้‡้‡‡ๆ ท่‡ณๆœ€็ปˆ้‡‡ๆ ท็Ž‡๏ผŒ0ไธบไธ่ฟ›่กŒ้‡้‡‡ๆ ท"),
983
+ value=0,
984
+ step=1,
985
+ interactive=True,
986
+ visible=False
987
+ )
988
+ rms_mix_rate0 = gr.Slider(
989
+ minimum=0,
990
+ maximum=1,
991
+ label=i18n("่พ“ๅ…ฅๆบ้Ÿณ้‡ๅŒ…็ปœๆ›ฟๆข่พ“ๅ‡บ้Ÿณ้‡ๅŒ…็ปœ่žๅˆๆฏ”ไพ‹๏ผŒ่ถŠ้ ่ฟ‘1่ถŠไฝฟ็”จ่พ“ๅ‡บๅŒ…็ปœ"),
992
+ value=0.21,
993
+ interactive=True,
994
+ )
995
+ protect0 = gr.Slider(
996
+ minimum=0,
997
+ maximum=0.5,
998
+ label=i18n(
999
+ "ไฟๆŠคๆธ…่พ…้Ÿณๅ’Œๅ‘ผๅธๅฃฐ๏ผŒ้˜ฒๆญข็”ต้Ÿณๆ’•่ฃ‚็ญ‰artifact๏ผŒๆ‹‰ๆปก0.5ไธๅผ€ๅฏ๏ผŒ่ฐƒไฝŽๅŠ ๅคงไฟๆŠคๅŠ›ๅบฆไฝ†ๅฏ่ƒฝ๏ฟฝ๏ฟฝ๏ฟฝไฝŽ็ดขๅผ•ๆ•ˆๆžœ"
1000
+ ),
1001
+ value=0.33,
1002
+ step=0.01,
1003
+ interactive=True,
1004
+ )
1005
+ file_index1 = gr.Textbox(
1006
+ label=i18n("็‰นๅพๆฃ€็ดขๅบ“ๆ–‡ไปถ่ทฏๅพ„,ไธบ็ฉบๅˆ™ไฝฟ็”จไธ‹ๆ‹‰็š„้€‰ๆ‹ฉ็ป“ๆžœ"),
1007
+ value="",
1008
+ interactive=True,
1009
+ visible=False
1010
+ )
1011
+ refresh_button.click(
1012
+ fn=change_choices,
1013
+ inputs=[],
1014
+ outputs=[sid0, file_index2, input_audio0],
1015
+ api_name="infer_refresh",
1016
+ )
1017
+ # file_big_npy1 = gr.Textbox(
1018
+ # label=i18n("็‰นๅพๆ–‡ไปถ่ทฏๅพ„"),
1019
+ # value="E:\\codes\py39\\vits_vc_gpu_train\\logs\\mi-test-1key\\total_fea.npy",
1020
+ # interactive=True,
1021
+ # )
1022
+ with gr.Row():
1023
+ f0_file = gr.File(label=i18n("F0ๆ›ฒ็บฟๆ–‡ไปถ, ๅฏ้€‰, ไธ€่กŒไธ€ไธช้Ÿณ้ซ˜, ไปฃๆ›ฟ้ป˜่ฎคF0ๅŠๅ‡้™่ฐƒ"), visible=False)
1024
+ with gr.Row():
1025
+ vc_output1 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"))
1026
+ but0.click(
1027
+ vc.vc_single,
1028
+ [
1029
+ spk_item,
1030
+ input_audio0,
1031
+ vc_transform0,
1032
+ f0_file,
1033
+ f0method0,
1034
+ file_index1,
1035
+ file_index2,
1036
+ # file_big_npy1,
1037
+ index_rate1,
1038
+ filter_radius0,
1039
+ resample_sr0,
1040
+ rms_mix_rate0,
1041
+ protect0,
1042
+ ],
1043
+ [vc_output1, vc_output2],
1044
+ api_name="infer_convert",
1045
+ )
1046
+ with gr.Row():
1047
+ with gr.Accordion(open=False, label=i18n("ๆ‰น้‡่ฝฌๆข, ่พ“ๅ…ฅๅพ…่ฝฌๆข้Ÿณ้ข‘ๆ–‡ไปถๅคน, ๆˆ–ไธŠไผ ๅคšไธช้Ÿณ้ข‘ๆ–‡ไปถ, ๅœจๆŒ‡ๅฎšๆ–‡ไปถๅคน(้ป˜่ฎคopt)ไธ‹่พ“ๅ‡บ่ฝฌๆข็š„้Ÿณ้ข‘. ")):
1048
+ with gr.Row():
1049
+ opt_input = gr.Textbox(label=i18n("ๆŒ‡ๅฎš่พ“ๅ‡บๆ–‡ไปถๅคน"), value="opt")
1050
+ vc_transform1 = gr.Number(
1051
+ label=i18n("ๅ˜่ฐƒ(ๆ•ดๆ•ฐ, ๅŠ้Ÿณๆ•ฐ้‡, ๅ‡ๅ…ซๅบฆ12้™ๅ…ซๅบฆ-12)"), value=0
1052
+ )
1053
+ f0method1 = gr.Radio(
1054
+ label=i18n(
1055
+ "้€‰ๆ‹ฉ้Ÿณ้ซ˜ๆๅ–็ฎ—ๆณ•,่พ“ๅ…ฅๆญŒๅฃฐๅฏ็”จpmๆ้€Ÿ,harvestไฝŽ้Ÿณๅฅฝไฝ†ๅทจๆ…ขๆ— ๆฏ”,crepeๆ•ˆๆžœๅฅฝไฝ†ๅƒGPU,rmvpeๆ•ˆๆžœๆœ€ๅฅฝไธ”ๅพฎๅƒGPU"
1056
+ ),
1057
+ choices=["pm", "harvest", "crepe", "rmvpe"]
1058
+ if config.dml == False
1059
+ else ["pm", "harvest", "rmvpe"],
1060
+ value="pm",
1061
+ interactive=True,
1062
+ )
1063
+ with gr.Row():
1064
+ filter_radius1 = gr.Slider(
1065
+ minimum=0,
1066
+ maximum=7,
1067
+ label=i18n(">=3ๅˆ™ไฝฟ็”จๅฏนharvest้Ÿณ้ซ˜่ฏ†ๅˆซ็š„็ป“ๆžœไฝฟ็”จไธญๅ€ผๆปคๆณข๏ผŒๆ•ฐๅ€ผไธบๆปคๆณขๅŠๅพ„๏ผŒไฝฟ็”จๅฏไปฅๅ‰Šๅผฑๅ“‘้Ÿณ"),
1068
+ value=3,
1069
+ step=1,
1070
+ interactive=True,
1071
+ visible=False
1072
+ )
1073
+ with gr.Row():
1074
+ file_index3 = gr.Textbox(
1075
+ label=i18n("็‰นๅพๆฃ€็ดขๅบ“ๆ–‡ไปถ่ทฏๅพ„,ไธบ็ฉบๅˆ™ไฝฟ็”จไธ‹ๆ‹‰็š„้€‰ๆ‹ฉ็ป“ๆžœ"),
1076
+ value="",
1077
+ interactive=True,
1078
+ visible=False
1079
+ )
1080
+ file_index4 = gr.Dropdown(
1081
+ label=i18n("่‡ชๅŠจๆฃ€ๆต‹index่ทฏๅพ„,ไธ‹ๆ‹‰ๅผ้€‰ๆ‹ฉ(dropdown)"),
1082
+ choices=sorted(index_paths),
1083
+ interactive=True,
1084
+ visible=False
1085
+ )
1086
+ refresh_button.click(
1087
+ fn=lambda: change_choices()[1],
1088
+ inputs=[],
1089
+ outputs=file_index4,
1090
+ api_name="infer_refresh_batch",
1091
+ )
1092
+ # file_big_npy2 = gr.Textbox(
1093
+ # label=i18n("็‰นๅพๆ–‡ไปถ่ทฏๅพ„"),
1094
+ # value="E:\\codes\\py39\\vits_vc_gpu_train\\logs\\mi-test-1key\\total_fea.npy",
1095
+ # interactive=True,
1096
+ # )
1097
+ index_rate2 = gr.Slider(
1098
+ minimum=0,
1099
+ maximum=1,
1100
+ label=i18n("ๆฃ€็ดข็‰นๅพๅ ๆฏ”"),
1101
+ value=1,
1102
+ interactive=True,
1103
+ visible=False
1104
+ )
1105
+ with gr.Row():
1106
+ resample_sr1 = gr.Slider(
1107
+ minimum=0,
1108
+ maximum=48000,
1109
+ label=i18n("ๅŽๅค„็†้‡้‡‡ๆ ท่‡ณๆœ€็ปˆ้‡‡ๆ ท็Ž‡๏ผŒ0ไธบไธ่ฟ›่กŒ้‡้‡‡ๆ ท"),
1110
+ value=0,
1111
+ step=1,
1112
+ interactive=True,
1113
+ visible=False
1114
+ )
1115
+ rms_mix_rate1 = gr.Slider(
1116
+ minimum=0,
1117
+ maximum=1,
1118
+ label=i18n("่พ“ๅ…ฅๆบ้Ÿณ้‡ๅŒ…็ปœๆ›ฟๆข่พ“ๅ‡บ้Ÿณ้‡ๅŒ…็ปœ่žๅˆๆฏ”ไพ‹๏ผŒ่ถŠ้ ่ฟ‘1่ถŠไฝฟ็”จ่พ“ๅ‡บๅŒ…็ปœ"),
1119
+ value=0.21,
1120
+ interactive=True,
1121
+ )
1122
+ protect1 = gr.Slider(
1123
+ minimum=0,
1124
+ maximum=0.5,
1125
+ label=i18n(
1126
+ "ไฟๆŠคๆธ…่พ…้Ÿณๅ’Œๅ‘ผๅธๅฃฐ๏ผŒ้˜ฒๆญข็”ต้Ÿณๆ’•่ฃ‚็ญ‰artifact๏ผŒๆ‹‰ๆปก0.5ไธๅผ€ๅฏ๏ผŒ่ฐƒไฝŽๅŠ ๅคงไฟๆŠคๅŠ›ๅบฆไฝ†ๅฏ่ƒฝ้™ไฝŽ็ดขๅผ•ๆ•ˆๆžœ"
1127
+ ),
1128
+ value=0.33,
1129
+ step=0.01,
1130
+ interactive=True,
1131
+ )
1132
+ with gr.Row():
1133
+ dir_input = gr.Textbox(
1134
+ label=i18n("่พ“ๅ…ฅๅพ…ๅค„็†้Ÿณ้ข‘ๆ–‡ไปถๅคน่ทฏๅพ„(ๅŽปๆ–‡ไปถ็ฎก็†ๅ™จๅœฐๅ€ๆ ๆ‹ทๅฐฑ่กŒไบ†)"),
1135
+ value="./audios",
1136
+ )
1137
+ inputs = gr.File(
1138
+ file_count="multiple", label=i18n("ไนŸๅฏๆ‰น้‡่พ“ๅ…ฅ้Ÿณ้ข‘ๆ–‡ไปถ, ไบŒ้€‰ไธ€, ไผ˜ๅ…ˆ่ฏปๆ–‡ไปถๅคน")
1139
+ )
1140
+ with gr.Row():
1141
+ format1 = gr.Radio(
1142
+ label=i18n("ๅฏผๅ‡บๆ–‡ไปถๆ ผๅผ"),
1143
+ choices=["wav", "flac", "mp3", "m4a"],
1144
+ value="wav",
1145
+ interactive=True,
1146
+ )
1147
+ but1 = gr.Button(i18n("่ฝฌๆข"), variant="primary")
1148
+ vc_output3 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"))
1149
+ but1.click(
1150
+ vc.vc_multi,
1151
+ [
1152
+ spk_item,
1153
+ dir_input,
1154
+ opt_input,
1155
+ inputs,
1156
+ vc_transform1,
1157
+ f0method1,
1158
+ file_index1,
1159
+ file_index2,
1160
+ # file_big_npy2,
1161
+ index_rate1,
1162
+ filter_radius1,
1163
+ resample_sr1,
1164
+ rms_mix_rate1,
1165
+ protect1,
1166
+ format1,
1167
+ ],
1168
+ [vc_output3],
1169
+ api_name="infer_convert_batch",
1170
+ )
1171
+ sid0.change(
1172
+ fn=vc.get_vc,
1173
+ inputs=[sid0, protect0, protect1],
1174
+ outputs=[spk_item, protect0, protect1, file_index2, file_index4],
1175
+ )
1176
+ with gr.TabItem("Download Model"):
1177
+ with gr.Row():
1178
+ url=gr.Textbox(label="Enter the URL to the Model:")
1179
+ with gr.Row():
1180
+ model = gr.Textbox(label="Name your model:")
1181
+ download_button=gr.Button("Download")
1182
+ with gr.Row():
1183
+ status_bar=gr.Textbox(label="")
1184
+ download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
1185
+ with gr.Row():
1186
+ gr.Markdown(
1187
+ """
1188
+ โค๏ธ If you use this and like it, help me keep it.โค๏ธ
1189
+ https://paypal.me/lesantillan
1190
+ """
1191
+ )
1192
+ with gr.TabItem(i18n("่ฎญ็ปƒ")):
1193
+ with gr.Row():
1194
+ with gr.Column():
1195
+ exp_dir1 = gr.Textbox(label=i18n("่พ“ๅ…ฅๅฎž้ชŒๅ"), value="My-Voice")
1196
+ np7 = gr.Slider(
1197
+ minimum=0,
1198
+ maximum=config.n_cpu,
1199
+ step=1,
1200
+ label=i18n("ๆๅ–้Ÿณ้ซ˜ๅ’Œๅค„็†ๆ•ฐๆฎไฝฟ็”จ็š„CPU่ฟ›็จ‹ๆ•ฐ"),
1201
+ value=int(np.ceil(config.n_cpu / 1.5)),
1202
+ interactive=True,
1203
+ )
1204
+ sr2 = gr.Radio(
1205
+ label=i18n("็›ฎๆ ‡้‡‡ๆ ท็Ž‡"),
1206
+ choices=["40k", "48k"],
1207
+ value="40k",
1208
+ interactive=True,
1209
+ visible=False
1210
+ )
1211
+ if_f0_3 = gr.Radio(
1212
+ label=i18n("ๆจกๅž‹ๆ˜ฏๅฆๅธฆ้Ÿณ้ซ˜ๆŒ‡ๅฏผ(ๅ”ฑๆญŒไธ€ๅฎš่ฆ, ่ฏญ้Ÿณๅฏไปฅไธ่ฆ)"),
1213
+ choices=[True, False],
1214
+ value=True,
1215
+ interactive=True,
1216
+ visible=False
1217
+ )
1218
+ version19 = gr.Radio(
1219
+ label=i18n("็‰ˆๆœฌ"),
1220
+ choices=["v1", "v2"],
1221
+ value="v2",
1222
+ interactive=True,
1223
+ visible=False,
1224
+ )
1225
+ trainset_dir4 = gr.Textbox(
1226
+ label=i18n("่พ“ๅ…ฅ่ฎญ็ปƒๆ–‡ไปถๅคน่ทฏๅพ„"), value='./dataset/'+datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
1227
+ )
1228
+ easy_uploader = gr.Files(label=i18n("ไนŸๅฏๆ‰น้‡่พ“ๅ…ฅ้Ÿณ้ข‘ๆ–‡ไปถ, ไบŒ้€‰ไธ€, ไผ˜ๅ…ˆ่ฏปๆ–‡ไปถๅคน"),file_types=['audio'])
1229
+ but1 = gr.Button(i18n("ๅค„็†ๆ•ฐๆฎ"), variant="primary")
1230
+ info1 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"), value="")
1231
+ easy_uploader.upload(fn=upload_to_dataset, inputs=[easy_uploader, trainset_dir4], outputs=[info1, trainset_dir4])
1232
+ gpus6 = gr.Textbox(
1233
+ label=i18n("ไปฅ-ๅˆ†้š”่พ“ๅ…ฅไฝฟ็”จ็š„ๅกๅท, ไพ‹ๅฆ‚ 0-1-2 ไฝฟ็”จๅก0ๅ’Œๅก1ๅ’Œๅก2"),
1234
+ value=gpus,
1235
+ interactive=True,
1236
+ visible=F0GPUVisible,
1237
+ )
1238
+ gpu_info9 = gr.Textbox(
1239
+ label=i18n("ๆ˜พๅกไฟกๆฏ"), value=gpu_info, visible=F0GPUVisible
1240
+ )
1241
+ spk_id5 = gr.Slider(
1242
+ minimum=0,
1243
+ maximum=4,
1244
+ step=1,
1245
+ label=i18n("่ฏทๆŒ‡ๅฎš่ฏด่ฏไบบid"),
1246
+ value=0,
1247
+ interactive=True,
1248
+ visible=False
1249
+ )
1250
+ but1.click(
1251
+ preprocess_dataset,
1252
+ [trainset_dir4, exp_dir1, sr2, np7],
1253
+ [info1],
1254
+ api_name="train_preprocess",
1255
+ )
1256
+ with gr.Column():
1257
+ f0method8 = gr.Radio(
1258
+ label=i18n(
1259
+ "้€‰ๆ‹ฉ้Ÿณ้ซ˜ๆๅ–็ฎ—ๆณ•:่พ“ๅ…ฅๆญŒๅฃฐๅฏ็”จpmๆ้€Ÿ,้ซ˜่ดจ้‡่ฏญ้Ÿณไฝ†CPUๅทฎๅฏ็”จdioๆ้€Ÿ,harvest่ดจ้‡ๆ›ดๅฅฝไฝ†ๆ…ข,rmvpeๆ•ˆๆžœๆœ€ๅฅฝไธ”ๅพฎๅƒCPU/GPU"
1260
+ ),
1261
+ choices=["pm", "harvest", "dio", "rmvpe", "rmvpe_gpu"],
1262
+ value="rmvpe_gpu",
1263
+ interactive=True,
1264
+ )
1265
+ gpus_rmvpe = gr.Textbox(
1266
+ label=i18n(
1267
+ "rmvpeๅกๅท้…็ฝฎ๏ผšไปฅ-ๅˆ†้š”่พ“ๅ…ฅไฝฟ็”จ็š„ไธๅŒ่ฟ›็จ‹ๅกๅท,ไพ‹ๅฆ‚0-0-1ไฝฟ็”จๅœจๅก0ไธŠ่ท‘2ไธช่ฟ›็จ‹ๅนถๅœจๅก1ไธŠ่ท‘1ไธช่ฟ›็จ‹"
1268
+ ),
1269
+ value="%s-%s" % (gpus, gpus),
1270
+ interactive=True,
1271
+ visible=F0GPUVisible,
1272
+ )
1273
+ but2 = gr.Button(i18n("็‰นๅพๆๅ–"), variant="primary")
1274
+ info2 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"), value="", max_lines=8)
1275
+ f0method8.change(
1276
+ fn=change_f0_method,
1277
+ inputs=[f0method8],
1278
+ outputs=[gpus_rmvpe],
1279
+ )
1280
+ but2.click(
1281
+ extract_f0_feature,
1282
+ [
1283
+ gpus6,
1284
+ np7,
1285
+ f0method8,
1286
+ if_f0_3,
1287
+ exp_dir1,
1288
+ version19,
1289
+ gpus_rmvpe,
1290
+ ],
1291
+ [info2],
1292
+ api_name="train_extract_f0_feature",
1293
+ )
1294
+ with gr.Column():
1295
+ total_epoch11 = gr.Slider(
1296
+ minimum=2,
1297
+ maximum=1000,
1298
+ step=1,
1299
+ label=i18n("ๆ€ป่ฎญ็ปƒ่ฝฎๆ•ฐtotal_epoch"),
1300
+ value=150,
1301
+ interactive=True,
1302
+ )
1303
+ gpus16 = gr.Textbox(
1304
+ label=i18n("ไปฅ-ๅˆ†้š”่พ“ๅ…ฅไฝฟ็”จ็š„ๅกๅท, ไพ‹ๅฆ‚ 0-1-2 ไฝฟ็”จๅก0ๅ’Œๅก1ๅ’Œๅก2"),
1305
+ value="0",
1306
+ interactive=True,
1307
+ visible=True
1308
+ )
1309
+ but3 = gr.Button(i18n("่ฎญ็ปƒๆจกๅž‹"), variant="primary")
1310
+ but4 = gr.Button(i18n("่ฎญ็ปƒ็‰นๅพ็ดขๅผ•"), variant="primary")
1311
+ info3 = gr.Textbox(label=i18n("่พ“ๅ‡บไฟกๆฏ"), value="", max_lines=10)
1312
+ with gr.Accordion(label=i18n("ๅธธ่ง„่ฎพ็ฝฎ"), open=False):
1313
+ save_epoch10 = gr.Slider(
1314
+ minimum=1,
1315
+ maximum=50,
1316
+ step=1,
1317
+ label=i18n("ไฟๅญ˜้ข‘็Ž‡save_every_epoch"),
1318
+ value=25,
1319
+ interactive=True,
1320
+ )
1321
+ batch_size12 = gr.Slider(
1322
+ minimum=1,
1323
+ maximum=40,
1324
+ step=1,
1325
+ label=i18n("ๆฏๅผ ๆ˜พๅก็š„batch_size"),
1326
+ value=default_batch_size,
1327
+ interactive=True,
1328
+ )
1329
+ if_save_latest13 = gr.Radio(
1330
+ label=i18n("ๆ˜ฏๅฆไป…ไฟๅญ˜ๆœ€ๆ–ฐ็š„ckptๆ–‡ไปถไปฅ่Š‚็œ็กฌ็›˜็ฉบ้—ด"),
1331
+ choices=[i18n("ๆ˜ฏ"), i18n("ๅฆ")],
1332
+ value=i18n("ๆ˜ฏ"),
1333
+ interactive=True,
1334
+ visible=False
1335
+ )
1336
+ if_cache_gpu17 = gr.Radio(
1337
+ label=i18n(
1338
+ "ๆ˜ฏๅฆ็ผ“ๅญ˜ๆ‰€ๆœ‰่ฎญ็ปƒ้›†่‡ณๆ˜พๅญ˜. 10minไปฅไธ‹ๅฐๆ•ฐๆฎๅฏ็ผ“ๅญ˜ไปฅๅŠ ้€Ÿ่ฎญ็ปƒ, ๅคงๆ•ฐๆฎ็ผ“ๅญ˜ไผš็‚ธๆ˜พๅญ˜ไนŸๅŠ ไธไบ†ๅคšๅฐ‘้€Ÿ"
1339
+ ),
1340
+ choices=[i18n("ๆ˜ฏ"), i18n("ๅฆ")],
1341
+ value=i18n("ๅฆ"),
1342
+ interactive=True,
1343
+ )
1344
+ if_save_every_weights18 = gr.Radio(
1345
+ label=i18n("ๆ˜ฏๅฆๅœจๆฏๆฌกไฟๅญ˜ๆ—ถ้—ด็‚นๅฐ†ๆœ€็ปˆๅฐๆจกๅž‹ไฟๅญ˜่‡ณweightsๆ–‡ไปถๅคน"),
1346
+ choices=[i18n("ๆ˜ฏ"), i18n("ๅฆ")],
1347
+ value=i18n("ๆ˜ฏ"),
1348
+ interactive=True,
1349
+ )
1350
+ with gr.Row():
1351
+ download_model = gr.Button('5.Download Model')
1352
+ with gr.Row():
1353
+ model_files = gr.Files(label='Your Model and Index file can be downloaded here:')
1354
+ download_model.click(fn=download_model_files, inputs=[exp_dir1], outputs=[model_files, info3])
1355
+ with gr.Row():
1356
+ pretrained_G14 = gr.Textbox(
1357
+ label=i18n("ๅŠ ่ฝฝ้ข„่ฎญ็ปƒๅบ•ๆจกG่ทฏๅพ„"),
1358
+ value="assets/pretrained_v2/f0G40k.pth",
1359
+ interactive=True,
1360
+ visible=False
1361
+ )
1362
+ pretrained_D15 = gr.Textbox(
1363
+ label=i18n("ๅŠ ่ฝฝ้ข„่ฎญ็ปƒๅบ•ๆจกD่ทฏๅพ„"),
1364
+ value="assets/pretrained_v2/f0D40k.pth",
1365
+ interactive=True,
1366
+ visible=False
1367
+ )
1368
+ sr2.change(
1369
+ change_sr2,
1370
+ [sr2, if_f0_3, version19],
1371
+ [pretrained_G14, pretrained_D15],
1372
+ )
1373
+ version19.change(
1374
+ change_version19,
1375
+ [sr2, if_f0_3, version19],
1376
+ [pretrained_G14, pretrained_D15, sr2],
1377
+ )
1378
+ if_f0_3.change(
1379
+ change_f0,
1380
+ [if_f0_3, sr2, version19],
1381
+ [f0method8, pretrained_G14, pretrained_D15],
1382
+ )
1383
+ with gr.Row():
1384
+ but5 = gr.Button(i18n("ไธ€้”ฎ่ฎญ็ปƒ"), variant="primary", visible=False)
1385
+ but3.click(
1386
+ click_train,
1387
+ [
1388
+ exp_dir1,
1389
+ sr2,
1390
+ if_f0_3,
1391
+ spk_id5,
1392
+ save_epoch10,
1393
+ total_epoch11,
1394
+ batch_size12,
1395
+ if_save_latest13,
1396
+ pretrained_G14,
1397
+ pretrained_D15,
1398
+ gpus16,
1399
+ if_cache_gpu17,
1400
+ if_save_every_weights18,
1401
+ version19,
1402
+ ],
1403
+ info3,
1404
+ api_name="train_start",
1405
+ )
1406
+ but4.click(train_index, [exp_dir1, version19], info3)
1407
+ but5.click(
1408
+ train1key,
1409
+ [
1410
+ exp_dir1,
1411
+ sr2,
1412
+ if_f0_3,
1413
+ trainset_dir4,
1414
+ spk_id5,
1415
+ np7,
1416
+ f0method8,
1417
+ save_epoch10,
1418
+ total_epoch11,
1419
+ batch_size12,
1420
+ if_save_latest13,
1421
+ pretrained_G14,
1422
+ pretrained_D15,
1423
+ gpus16,
1424
+ if_cache_gpu17,
1425
+ if_save_every_weights18,
1426
+ version19,
1427
+ gpus_rmvpe,
1428
+ ],
1429
+ info3,
1430
+ api_name="train_start_all",
1431
+ )
1432
+
1433
+ if config.iscolab:
1434
+ app.queue(concurrency_count=511, max_size=1022).launch(share=True)
1435
+ else:
1436
+ app.queue(concurrency_count=511, max_size=1022).launch(
1437
+ server_name="0.0.0.0",
1438
+ inbrowser=not config.noautoopen,
1439
+ server_port=config.listen_port,
1440
+ quiet=True,
1441
+ )
assets/hubert/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
assets/pretrained/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
assets/pretrained_v2/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
assets/rmvpe/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
assets/uvr5_weights/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
assets/weights/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
audios/somegirl.mp3 ADDED
Binary file (32.2 kB). View file
 
audios/someguy.mp3 ADDED
Binary file (24.9 kB). View file
 
audios/unachica.mp3 ADDED
Binary file (36.4 kB). View file
 
audios/unchico.mp3 ADDED
Binary file (35.9 kB). View file
 
configs/config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "pth_path": "assets/weights/kikiV1.pth",
3
+ "index_path": "logs/kikiV1.index",
4
+ "sg_input_device": "VoiceMeeter Output (VB-Audio Vo (MME)",
5
+ "sg_output_device": "VoiceMeeter Aux Input (VB-Audio (MME)",
6
+ "threhold": -45.0,
7
+ "pitch": 12.0,
8
+ "index_rate": 0.0,
9
+ "rms_mix_rate": 0.0,
10
+ "block_time": 0.25,
11
+ "crossfade_length": 0.04,
12
+ "extra_time": 2.0,
13
+ "n_cpu": 6.0,
14
+ "f0method": "rmvpe"
15
+ }
configs/config.py ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import os
3
+ import sys
4
+ import json
5
+ from multiprocessing import cpu_count
6
+
7
+ import torch
8
+ try:
9
+ import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import
10
+ if torch.xpu.is_available():
11
+ from infer.modules.ipex import ipex_init
12
+ ipex_init()
13
+ except Exception:
14
+ pass
15
+ import logging
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ version_config_list = [
21
+ "v1/32k.json",
22
+ "v1/40k.json",
23
+ "v1/48k.json",
24
+ "v2/48k.json",
25
+ "v2/32k.json",
26
+ ]
27
+
28
+
29
+ def singleton_variable(func):
30
+ def wrapper(*args, **kwargs):
31
+ if not wrapper.instance:
32
+ wrapper.instance = func(*args, **kwargs)
33
+ return wrapper.instance
34
+
35
+ wrapper.instance = None
36
+ return wrapper
37
+
38
+
39
+ @singleton_variable
40
+ class Config:
41
+ def __init__(self):
42
+ self.device = "cuda:0"
43
+ self.is_half = True
44
+ self.n_cpu = 0
45
+ self.gpu_name = None
46
+ self.json_config = self.load_config_json()
47
+ self.gpu_mem = None
48
+ (
49
+ self.python_cmd,
50
+ self.listen_port,
51
+ self.iscolab,
52
+ self.noparallel,
53
+ self.noautoopen,
54
+ self.dml,
55
+ ) = self.arg_parse()
56
+ self.instead = ""
57
+ self.x_pad, self.x_query, self.x_center, self.x_max = self.device_config()
58
+
59
+ @staticmethod
60
+ def load_config_json() -> dict:
61
+ d = {}
62
+ for config_file in version_config_list:
63
+ with open(f"configs/{config_file}", "r") as f:
64
+ d[config_file] = json.load(f)
65
+ return d
66
+
67
+ @staticmethod
68
+ def arg_parse() -> tuple:
69
+ exe = sys.executable or "python"
70
+ parser = argparse.ArgumentParser()
71
+ parser.add_argument("--port", type=int, default=7865, help="Listen port")
72
+ parser.add_argument("--pycmd", type=str, default=exe, help="Python command")
73
+ parser.add_argument("--colab", action="store_true", help="Launch in colab")
74
+ parser.add_argument(
75
+ "--noparallel", action="store_true", help="Disable parallel processing"
76
+ )
77
+ parser.add_argument(
78
+ "--noautoopen",
79
+ action="store_true",
80
+ help="Do not open in browser automatically",
81
+ )
82
+ parser.add_argument(
83
+ "--dml",
84
+ action="store_true",
85
+ help="torch_dml",
86
+ )
87
+ cmd_opts = parser.parse_args()
88
+
89
+ cmd_opts.port = cmd_opts.port if 0 <= cmd_opts.port <= 65535 else 7865
90
+
91
+ return (
92
+ cmd_opts.pycmd,
93
+ cmd_opts.port,
94
+ cmd_opts.colab,
95
+ cmd_opts.noparallel,
96
+ cmd_opts.noautoopen,
97
+ cmd_opts.dml,
98
+ )
99
+
100
+ # has_mps is only available in nightly pytorch (for now) and MasOS 12.3+.
101
+ # check `getattr` and try it for compatibility
102
+ @staticmethod
103
+ def has_mps() -> bool:
104
+ if not torch.backends.mps.is_available():
105
+ return False
106
+ try:
107
+ torch.zeros(1).to(torch.device("mps"))
108
+ return True
109
+ except Exception:
110
+ return False
111
+
112
+ @staticmethod
113
+ def has_xpu() -> bool:
114
+ if hasattr(torch, "xpu") and torch.xpu.is_available():
115
+ return True
116
+ else:
117
+ return False
118
+
119
+ def use_fp32_config(self):
120
+ for config_file in version_config_list:
121
+ self.json_config[config_file]["train"]["fp16_run"] = False
122
+
123
+ def device_config(self) -> tuple:
124
+ if torch.cuda.is_available():
125
+ if self.has_xpu():
126
+ self.device = self.instead = "xpu:0"
127
+ self.is_half = True
128
+ i_device = int(self.device.split(":")[-1])
129
+ self.gpu_name = torch.cuda.get_device_name(i_device)
130
+ if (
131
+ ("16" in self.gpu_name and "V100" not in self.gpu_name.upper())
132
+ or "P40" in self.gpu_name.upper()
133
+ or "P10" in self.gpu_name.upper()
134
+ or "1060" in self.gpu_name
135
+ or "1070" in self.gpu_name
136
+ or "1080" in self.gpu_name
137
+ ):
138
+ logger.info("Found GPU %s, force to fp32", self.gpu_name)
139
+ self.is_half = False
140
+ self.use_fp32_config()
141
+ else:
142
+ logger.info("Found GPU %s", self.gpu_name)
143
+ self.gpu_mem = int(
144
+ torch.cuda.get_device_properties(i_device).total_memory
145
+ / 1024
146
+ / 1024
147
+ / 1024
148
+ + 0.4
149
+ )
150
+ if self.gpu_mem <= 4:
151
+ with open("infer/modules/train/preprocess.py", "r") as f:
152
+ strr = f.read().replace("3.7", "3.0")
153
+ with open("infer/modules/train/preprocess.py", "w") as f:
154
+ f.write(strr)
155
+ elif self.has_mps():
156
+ logger.info("No supported Nvidia GPU found")
157
+ self.device = self.instead = "mps"
158
+ self.is_half = False
159
+ self.use_fp32_config()
160
+ else:
161
+ logger.info("No supported Nvidia GPU found")
162
+ self.device = self.instead = "cpu"
163
+ self.is_half = False
164
+ self.use_fp32_config()
165
+
166
+ if self.n_cpu == 0:
167
+ self.n_cpu = cpu_count()
168
+
169
+ if self.is_half:
170
+ # 6Gๆ˜พๅญ˜้…็ฝฎ
171
+ x_pad = 3
172
+ x_query = 10
173
+ x_center = 60
174
+ x_max = 65
175
+ else:
176
+ # 5Gๆ˜พๅญ˜้…็ฝฎ
177
+ x_pad = 1
178
+ x_query = 6
179
+ x_center = 38
180
+ x_max = 41
181
+
182
+ if self.gpu_mem is not None and self.gpu_mem <= 4:
183
+ x_pad = 1
184
+ x_query = 5
185
+ x_center = 30
186
+ x_max = 32
187
+ if self.dml:
188
+ logger.info("Use DirectML instead")
189
+ if (
190
+ os.path.exists(
191
+ "runtime\Lib\site-packages\onnxruntime\capi\DirectML.dll"
192
+ )
193
+ == False
194
+ ):
195
+ try:
196
+ os.rename(
197
+ "runtime\Lib\site-packages\onnxruntime",
198
+ "runtime\Lib\site-packages\onnxruntime-cuda",
199
+ )
200
+ except:
201
+ pass
202
+ try:
203
+ os.rename(
204
+ "runtime\Lib\site-packages\onnxruntime-dml",
205
+ "runtime\Lib\site-packages\onnxruntime",
206
+ )
207
+ except:
208
+ pass
209
+ # if self.device != "cpu":
210
+ import torch_directml
211
+
212
+ self.device = torch_directml.device(torch_directml.default_device())
213
+ self.is_half = False
214
+ else:
215
+ if self.instead:
216
+ logger.info(f"Use {self.instead} instead")
217
+ if (
218
+ os.path.exists(
219
+ "runtime\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
220
+ )
221
+ == False
222
+ ):
223
+ try:
224
+ os.rename(
225
+ "runtime\Lib\site-packages\onnxruntime",
226
+ "runtime\Lib\site-packages\onnxruntime-dml",
227
+ )
228
+ except:
229
+ pass
230
+ try:
231
+ os.rename(
232
+ "runtime\Lib\site-packages\onnxruntime-cuda",
233
+ "runtime\Lib\site-packages\onnxruntime",
234
+ )
235
+ except:
236
+ pass
237
+ 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": 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,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
+ }
docker-compose.yml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
docs/cn/Changelog_CN.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 20230813ๆ›ดๆ–ฐ
2
+ 1-ๅธธ่ง„bugไฟฎๅค
3
+ - ไฟๅญ˜้ข‘็Ž‡ๆ€ป่ฝฎๆ•ฐๆœ€ไฝŽๆ”นไธบ1 ๆ€ป่ฝฎๆ•ฐๆœ€ไฝŽๆ”นไธบ2
4
+ - ไฟฎๅคๆ— pretrainๆจกๅž‹่ฎญ็ปƒๆŠฅ้”™
5
+ - ๅขžๅŠ ไผดๅฅไบบๅฃฐๅˆ†็ฆปๅฎŒๆฏ•ๆธ…็†ๆ˜พๅญ˜
6
+ - faissไฟๅญ˜่ทฏๅพ„็ปๅฏน่ทฏๅพ„ๆ”นไธบ็›ธๅฏน่ทฏๅพ„
7
+ - ๆ”ฏๆŒ่ทฏๅพ„ๅŒ…ๅซ็ฉบๆ ผ๏ผˆ่ฎญ็ปƒ้›†่ทฏๅพ„+ๅฎž้ชŒๅ็งฐๅ‡ๆ”ฏๆŒ๏ผŒไธๅ†ไผšๆŠฅ้”™๏ผ‰
8
+ - filelistๅ–ๆถˆๅผบๅˆถutf8็ผ–็ 
9
+ - ่งฃๅ†ณๅฎžๆ—ถๅ˜ๅฃฐไธญๅผ€ๅฏ็ดขๅผ•ๅฏผ่‡ด็š„CPUๆžๅคงๅ ็”จ้—ฎ้ข˜
10
+
11
+ 2-้‡็‚นๆ›ดๆ–ฐ
12
+ - ่ฎญ็ปƒๅ‡บๅฝ“ๅ‰ๆœ€ๅผบๅผ€ๆบไบบๅฃฐ้Ÿณ้ซ˜ๆๅ–ๆจกๅž‹RMVPE๏ผŒๅนถ็”จไบŽRVC็š„่ฎญ็ปƒใ€็ฆป็บฟ/ๅฎžๆ—ถๆŽจ็†๏ผŒๆ”ฏๆŒpytorch/onnx/DirectML
13
+ - ้€š่ฟ‡pytorch-dmlๆ”ฏๆŒAๅกๅ’ŒIๅก็š„
14
+ ๏ผˆ1๏ผ‰ๅฎžๆ—ถๅ˜ๅฃฐ๏ผˆ2๏ผ‰ๆŽจ็†๏ผˆ3๏ผ‰ไบบๅฃฐไผดๅฅๅˆ†็ฆป๏ผˆ4๏ผ‰่ฎญ็ปƒๆš‚ๆœชๆ”ฏๆŒ๏ผŒไผšๅˆ‡ๆข่‡ณCPU่ฎญ็ปƒ๏ผ›้€š่ฟ‡onnx_dmlๆ”ฏๆŒrmvpe_gpu็š„ๆŽจ็†
15
+
16
+ ### 20230618ๆ›ดๆ–ฐ
17
+ - v2ๅขžๅŠ 32kๅ’Œ48kไธคไธชๆ–ฐ้ข„่ฎญ็ปƒๆจกๅž‹
18
+ - ไฟฎๅค้žf0ๆจกๅž‹ๆŽจ็†ๆŠฅ้”™
19
+ - ๅฏนไบŽ่ถ…่ฟ‡ไธ€ๅฐๆ—ถ็š„่ฎญ็ปƒ้›†็š„็ดขๅผ•ๅปบ็ซ‹็Žฏ่Š‚๏ผŒ่‡ชๅŠจkmeans็ผฉๅฐ็‰นๅพๅค„็†ไปฅๅŠ ้€Ÿ็ดขๅผ•่ฎญ็ปƒใ€ๅŠ ๅ…ฅๅ’ŒๆŸฅ่ฏข
20
+ - ้™„้€ไธ€ไธชไบบๅฃฐ่ฝฌๅ‰ไป–็Žฉๅ…ทไป“ๅบ“
21
+ - ๆ•ฐๆฎๅค„็†ๅ‰”้™คๅผ‚ๅธธๅ€ผๅˆ‡็‰‡
22
+ - onnxๅฏผๅ‡บ้€‰้กนๅก
23
+
24
+ ๅคฑ่ดฅ็š„ๅฎž้ชŒ๏ผš
25
+ - ~~็‰นๅพๆฃ€็ดขๅขžๅŠ ๆ—ถๅบ็ปดๅบฆ๏ผšๅฏ„๏ผŒๆฒกๅ•ฅๆ•ˆๆžœ~~
26
+ - ~~็‰นๅพๆฃ€็ดขๅขžๅŠ PCAR้™็ปดๅฏ้€‰้กน๏ผšๅฏ„๏ผŒๆ•ฐๆฎๅคง็”จkmeans็ผฉๅฐๆ•ฐๆฎ้‡๏ผŒๆ•ฐๆฎๅฐ้™็ปดๆ“ไฝœ่€—ๆ—ถๆฏ”็œไธ‹็š„ๅŒน้…่€—ๆ—ถ่ฟ˜ๅคš~~
27
+ - ~~ๆ”ฏๆŒonnxๆŽจ็†๏ผˆ้™„ๅธฆไป…ๆŽจ็†็š„ๅฐๅŽ‹็ผฉๅŒ…๏ผ‰๏ผšๅฏ„๏ผŒ็”Ÿๆˆnsf่ฟ˜ๆ˜ฏ้œ€่ฆpytorch~~
28
+ - ~~่ฎญ็ปƒๆ—ถๅœจ้Ÿณ้ซ˜ใ€genderใ€eqใ€ๅ™ชๅฃฐ็ญ‰ๆ–น้ขๅฏน่พ“ๅ…ฅ่ฟ›่กŒ้šๆœบๅขžๅผบ๏ผšๅฏ„๏ผŒๆฒกๅ•ฅๆ•ˆๆžœ~~
29
+ - ~~ๆŽฅๅ…ฅๅฐๅž‹ๅฃฐ็ ๅ™จ่ฐƒ็ ”:ๅฏ„๏ผŒๆ•ˆๆžœๅ˜ๅทฎ~~
30
+
31
+ todolist๏ผš
32
+ - ~~่ฎญ็ปƒ้›†้Ÿณ้ซ˜่ฏ†ๅˆซๆ”ฏๆŒcrepe๏ผšๅทฒ็ป่ขซRMVPEๅ–ไปฃ๏ผŒไธ้œ€่ฆ~~
33
+ - ~~ๅคš่ฟ›็จ‹harvestๆŽจ็†๏ผšๅทฒ็ป่ขซRMVPEๅ–ไปฃ๏ผŒไธ้œ€่ฆ~~
34
+ - ~~crepe็š„็ฒพๅบฆๆ”ฏๆŒๅ’ŒRVC-configๅŒๆญฅ๏ผšๅทฒ็ป่ขซRMVPEๅ–ไปฃ๏ผŒไธ้œ€่ฆใ€‚ๆ”ฏๆŒ่ฟ™ไธช่ฟ˜่ฆๅŒๆญฅtorchcrepe็š„ๅบ“๏ผŒ้บป็ƒฆ~~
35
+ - ๅฏนๆŽฅF0็ผ–่พ‘ๅ™จ
36
+
37
+
38
+ ### 20230528ๆ›ดๆ–ฐ
39
+ - ๅขžๅŠ v2็š„jupyter notebook๏ผŒ้Ÿฉๆ–‡changelog๏ผŒๅขžๅŠ ไธ€ไบ›็Žฏๅขƒไพ่ต–
40
+ - ๅขžๅŠ ๅ‘ผๅธใ€ๆธ…่พ…้Ÿณใ€้ฝฟ้ŸณไฟๆŠคๆจกๅผ
41
+ - ๆ”ฏๆŒcrepe-fullๆŽจ็†
42
+ - UVR5ไบบๅฃฐไผดๅฅๅˆ†็ฆปๅŠ ไธŠ3ไธชๅŽปๅปถ่ฟŸๆจกๅž‹ๅ’ŒMDX-NetๅŽปๆททๅ“ๆจกๅž‹๏ผŒๅขžๅŠ HP3ไบบๅฃฐๆๅ–ๆจกๅž‹
43
+ - ็ดขๅผ•ๅ็งฐๅขžๅŠ ็‰ˆๆœฌๅ’Œๅฎž้ชŒๅ็งฐ
44
+ - ไบบๅฃฐไผดๅฅๅˆ†็ฆปใ€ๆŽจ็†ๆ‰น้‡ๅฏผๅ‡บๅขžๅŠ ้Ÿณ้ข‘ๅฏผๅ‡บๆ ผๅผ้€‰้กน
45
+ - ๅบŸๅผƒ32kๆจกๅž‹็š„่ฎญ็ปƒ
46
+
47
+ ### 20230513ๆ›ดๆ–ฐ
48
+ - ๆธ…้™คไธ€้”ฎๅŒ…ๅ†…้ƒจ่€็‰ˆๆœฌruntimeๅ†…ๆฎ‹็•™็š„lib.infer_packๅ’Œuvr5_pack
49
+ - ไฟฎๅค่ฎญ็ปƒ้›†้ข„ๅค„็†ไผชๅคš่ฟ›็จ‹็š„bug
50
+ - ๅขžๅŠ harvest่ฏ†ๅˆซ้Ÿณ้ซ˜ๅฏ้€‰้€š่ฟ‡ไธญๅ€ผๆปคๆณขๅ‰Šๅผฑๅ“‘้Ÿณ็Žฐ่ฑก๏ผŒๅฏ่ฐƒๆ•ดไธญๅ€ผๆปคๆณขๅŠๅพ„
51
+ - ๅฏผๅ‡บ้Ÿณ้ข‘ๅขžๅŠ ๅŽๅค„็†้‡้‡‡ๆ ท
52
+ - ่ฎญ็ปƒn_cpu่ฟ›็จ‹ๆ•ฐไปŽ"ไป…่ฐƒๆ•ดf0ๆๅ–"ๆ”นไธบ"่ฐƒๆ•ดๆ•ฐๆฎ้ข„ๅค„็†ๅ’Œf0ๆๅ–"
53
+ - ่‡ชๅŠจๆฃ€ๆต‹logsๆ–‡ไปถๅคนไธ‹็š„index่ทฏๅพ„๏ผŒๆไพ›ไธ‹ๆ‹‰ๅˆ—่กจๅŠŸ่ƒฝ
54
+ - tab้กตๅขžๅŠ "ๅธธ่ง้—ฎ้ข˜่งฃ็ญ”"๏ผˆไนŸๅฏๅ‚่€ƒgithub-rvc-wiki๏ผ‰
55
+ - ็›ธๅŒ่ทฏๅพ„็š„่พ“ๅ…ฅ้Ÿณ้ข‘ๆŽจ็†ๅขžๅŠ ไบ†้Ÿณ้ซ˜็ผ“ๅญ˜๏ผˆ็”จ้€”๏ผšไฝฟ็”จharvest้Ÿณ้ซ˜ๆๅ–๏ผŒๆ•ดไธชpipelineไผš็ปๅŽ†ๆผซ้•ฟไธ”้‡ๅค็š„้Ÿณ้ซ˜ๆๅ–่ฟ‡็จ‹๏ผŒๅฆ‚ๆžœไธไฝฟ็”จ็ผ“ๅญ˜๏ผŒๅฎž้ชŒไธๅŒ้Ÿณ่‰ฒใ€็ดขๅผ•ใ€้Ÿณ้ซ˜ไธญๅ€ผๆปคๆณขๅŠๅพ„ๅ‚ๆ•ฐ็š„็”จๆˆทๅœจ็ฌฌไธ€ๆฌกๆต‹่ฏ•ๅŽ็š„็ญ‰ๅพ…็ป“ๆžœไผš้žๅธธ็—›่‹ฆ๏ผ‰
56
+
57
+ ### 20230514ๆ›ดๆ–ฐ
58
+ - ้Ÿณ้‡ๅŒ…็ปœๅฏน้ฝ่พ“ๅ…ฅๆททๅˆ๏ผˆๅฏไปฅ็ผ“่งฃโ€œ่พ“ๅ…ฅ้™้Ÿณ่พ“ๅ‡บๅฐๅน…ๅบฆๅ™ชๅฃฐโ€็š„้—ฎ้ข˜ใ€‚ๅฆ‚ๆžœ่พ“ๅ…ฅ้Ÿณ้ข‘่ƒŒๆ™ฏๅบ•ๅ™ชๅคงๅˆ™ไธๅปบ่ฎฎๅผ€ๅฏ๏ผŒ้ป˜่ฎคไธๅผ€ๅฏ๏ผˆๅ€ผไธบ1ๅฏ่ง†ไธบไธๅผ€ๅฏ๏ผ‰๏ผ‰
59
+ - ๆ”ฏๆŒๆŒ‰็…งๆŒ‡ๅฎš้ข‘็Ž‡ไฟๅญ˜ๆๅ–็š„ๅฐๆจกๅž‹๏ผˆๅ‡ๅฆ‚ไฝ ๆƒณๅฐ่ฏ•ไธๅŒepochไธ‹็š„ๆŽจ็†ๆ•ˆๆžœ๏ผŒไฝ†ๆ˜ฏไธๆƒณไฟๅญ˜ๆ‰€ๆœ‰ๅคงcheckpointๅนถไธ”ๆฏๆฌก้ƒฝ่ฆckptๆ‰‹ๅทฅๅค„็†ๆๅ–ๅฐๆจกๅž‹๏ผŒ่ฟ™้กนๅŠŸ่ƒฝไผš้žๅธธๅฎž็”จ๏ผ‰
60
+ - ้€š่ฟ‡่ฎพ็ฝฎ็Žฏๅขƒๅ˜้‡่งฃๅ†ณๆœๅŠก็ซฏๅผ€ไบ†็ณป็ปŸๅ…จๅฑ€ไปฃ็†ๅฏผ่‡ดๆต่งˆๅ™จ่ฟžๆŽฅ้”™่ฏฏ็š„้—ฎ้ข˜
61
+ - ๆ”ฏๆŒv2้ข„่ฎญ็ปƒๆจกๅž‹๏ผˆ็›ฎๅ‰ๅชๅ…ฌๅผ€ไบ†40k็‰ˆๆœฌ่ฟ›่กŒๆต‹่ฏ•๏ผŒๅฆๅค–2ไธช้‡‡ๆ ท็Ž‡่ฟ˜ๆฒกๆœ‰่ฎญ็ปƒๅฎŒๅ…จ๏ผ‰
62
+ - ๆŽจ็†ๅ‰้™ๅˆถ่ถ…่ฟ‡1็š„่ฟ‡ๅคง้Ÿณ้‡
63
+ - ๅพฎ่ฐƒๆ•ฐๆฎ้ข„ๅค„็†ๅ‚ๆ•ฐ
64
+
65
+
66
+ ### 20230409ๆ›ดๆ–ฐ
67
+ - ไฟฎๆญฃ่ฎญ็ปƒๅ‚ๆ•ฐ๏ผŒๆๅ‡ๆ˜พๅกๅนณๅ‡ๅˆฉ็”จ็Ž‡๏ผŒA100ๆœ€้ซ˜ไปŽ25%ๆๅ‡่‡ณ90%ๅทฆๅณ๏ผŒV100:50%->90%ๅทฆๅณ๏ผŒ2060S:60%->85%ๅทฆๅณ๏ผŒP40:25%->95%ๅทฆๅณ๏ผŒ่ฎญ็ปƒ้€Ÿๅบฆๆ˜พ่‘—ๆๅ‡
68
+ - ไฟฎๆญฃๅ‚ๆ•ฐ๏ผšๆ€ปbatch_sizeๆ”นไธบๆฏๅผ ๅก็š„batch_size
69
+ - ไฟฎๆญฃtotal_epoch๏ผšๆœ€ๅคง้™ๅˆถ100่งฃ้”่‡ณ1000๏ผ›้ป˜่ฎค10ๆๅ‡่‡ณ้ป˜่ฎค20
70
+ - ไฟฎๅคckptๆๅ–่ฏ†ๅˆซๆ˜ฏๅฆๅธฆ้Ÿณ้ซ˜้”™่ฏฏๅฏผ่‡ดๆŽจ็†ๅผ‚ๅธธ็š„้—ฎ้ข˜
71
+ - ไฟฎๅคๅˆ†ๅธƒๅผ่ฎญ็ปƒๆฏไธชrank้ƒฝไฟๅญ˜ไธ€ๆฌกckpt็š„้—ฎ้ข˜
72
+ - ็‰นๅพๆๅ–่ฟ›่กŒnan็‰นๅพ่ฟ‡ๆปค
73
+ - ไฟฎๅค้™้Ÿณ่พ“ๅ…ฅ่พ“ๅ‡บ้šๆœบ่พ…้Ÿณorๅ™ชๅฃฐ็š„้—ฎ้ข˜๏ผˆ่€็‰ˆๆจกๅž‹้œ€่ฆ้‡ๅš่ฎญ็ปƒ้›†้‡่ฎญ๏ผ‰
74
+
75
+ ### 20230416ๆ›ดๆ–ฐ
76
+ - ๆ–ฐๅขžๆœฌๅœฐๅฎžๆ—ถๅ˜ๅฃฐ่ฟทไฝ GUI๏ผŒๅŒๅ‡ปgo-realtime-gui.batๅฏๅŠจ
77
+ - ่ฎญ็ปƒๆŽจ็†ๅ‡ๅฏน<50Hz็š„้ข‘ๆฎต่ฟ›่กŒๆปคๆณข่ฟ‡ๆปค
78
+ - ่ฎญ็ปƒๆŽจ็†้Ÿณ้ซ˜ๆๅ–pyworldๆœ€ไฝŽ้Ÿณ้ซ˜ไปŽ้ป˜่ฎค80ไธ‹้™่‡ณ50,50-80hz้—ด็š„็”ทๅฃฐไฝŽ้Ÿณไธไผšๅ“‘
79
+ - WebUIๆ”ฏๆŒๆ นๆฎ็ณป็ปŸๅŒบๅŸŸๅ˜ๆ›ด่ฏญ่จ€๏ผˆ็Žฐๆ”ฏๆŒen_US๏ผŒja_JP๏ผŒzh_CN๏ผŒzh_HK๏ผŒzh_SG๏ผŒzh_TW๏ผŒไธๆ”ฏๆŒ็š„้ป˜่ฎคen_US๏ผ‰
80
+ - ไฟฎๆญฃ้ƒจๅˆ†ๆ˜พๅก่ฏ†ๅˆซ๏ผˆไพ‹ๅฆ‚V100-16G่ฏ†ๅˆซๅคฑ่ดฅ๏ผŒP4่ฏ†ๅˆซๅคฑ่ดฅ๏ผ‰
81
+
82
+ ### 20230428ๆ›ดๆ–ฐ
83
+ - ๅ‡็บงfaiss็ดขๅผ•่ฎพ็ฝฎ๏ผŒ้€Ÿๅบฆๆ›ดๅฟซ๏ผŒ่ดจ้‡ๆ›ด้ซ˜
84
+ - ๅ–ๆถˆtotal_npyไพ่ต–๏ผŒๅŽ็ปญๅˆ†ไบซๆจกๅž‹ไธๅ†้œ€่ฆๅกซๅ†™total_npy
85
+ - ่งฃ้”16็ณป้™ๅˆถใ€‚4Gๆ˜พๅญ˜GPU็ป™ๅˆฐ4G็š„ๆŽจ็†่ฎพ็ฝฎใ€‚
86
+ - ไฟฎๅค้ƒจๅˆ†้Ÿณ้ข‘ๆ ผๅผไธ‹UVR5ไบบๅฃฐไผดๅฅๅˆ†็ฆป็š„bug
87
+ - ๅฎžๆ—ถๅ˜ๅฃฐ่ฟทไฝ guiๅขžๅŠ ๅฏน้ž40kไธŽไธๆ‡ˆๆ€ ้Ÿณ้ซ˜ๆจกๅž‹็š„ๆ”ฏๆŒ
88
+
89
+ ### ๅŽ็ปญ่ฎกๅˆ’๏ผš
90
+ ๅŠŸ่ƒฝ๏ผš
91
+ - ๆ”ฏๆŒๅคšไบบ่ฎญ็ปƒ้€‰้กนๅก๏ผˆ่‡ณๅคš4ไบบ๏ผ‰
92
+
93
+ ๅบ•ๆจก๏ผš
94
+ - ๆ”ถ้›†ๅ‘ผๅธwavๅŠ ๅ…ฅ่ฎญ็ปƒ้›†ไฟฎๆญฃๅ‘ผๅธๅ˜ๅฃฐ็”ต้Ÿณ็š„้—ฎ้ข˜
95
+ - ๆˆ‘ไปฌๆญฃๅœจ่ฎญ็ปƒๅขžๅŠ ไบ†ๆญŒๅฃฐ่ฎญ็ปƒ้›†็š„ๅบ•ๆจก๏ผŒๆœชๆฅไผšๅ…ฌๅผ€
96
+
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,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 2023-08-13
2
+ 1-Regular bug fix
3
+ - Change the minimum total epoch number to 1, and change the minimum total epoch number to 2
4
+ - Fix training errors of not using pre-train models
5
+ - After accompaniment vocals separation, clear graphics memory
6
+ - Change faiss save path absolute path to relative path
7
+ - Support path containing spaces (both training set path and experiment name are supported, and errors will no longer be reported)
8
+ - Filelist cancels mandatory utf8 encoding
9
+ - Solve the CPU consumption problem caused by faiss searching during real-time voice changes
10
+
11
+ 2-Key updates
12
+ - 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
13
+ - Support for AMD and Intel graphics cards through Pytorch_DML
14
+
15
+ (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
16
+
17
+
18
+ ### 2023-06-18
19
+ - New pretrained v2 models: 32k and 48k
20
+ - Fix non-f0 model inference errors
21
+ - 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.
22
+ - Provide a toy vocal2guitar huggingface space
23
+ - Auto delete outlier short cut training-set audios
24
+ - Onnx export tab
25
+
26
+ Failed experiments:
27
+ - ~~Feature retrieval: add temporal feature retrieval: not effective~~
28
+ - ~~Feature retrieval: add PCAR dimensionality reduction: searching is even slower~~
29
+ - ~~Random data augmentation when training: not effective~~
30
+
31
+ todolist๏ผš
32
+ - ~~Vocos-RVC (tiny vocoder): not effective~~
33
+ - ~~Crepe support for training๏ผšreplaced by RMVPE~~
34
+ - ~~Half precision crepe inference๏ผšreplaced by RMVPE. And hard to achive.~~
35
+ - F0 editor support
36
+
37
+ ### 2023-05-28
38
+ - Add v2 jupyter notebook, korean changelog, fix some environment requirments
39
+ - Add voiceless consonant and breath protection mode
40
+ - Support crepe-full pitch detect
41
+ - UVR5 vocal separation: support dereverb models and de-echo models
42
+ - Add experiment name and version on the name of index
43
+ - Support users to manually select export format of output audios when batch voice conversion processing and UVR5 vocal separation
44
+ - v1 32k model training is no more supported
45
+
46
+ ### 2023-05-13
47
+ - Clear the redundant codes in the old version of runtime in the one-click-package: lib.infer_pack and uvr5_pack
48
+ - Fix pseudo multiprocessing bug in training set preprocessing
49
+ - Adding median filtering radius adjustment for harvest pitch recognize algorithm
50
+ - Support post processing resampling for exporting audio
51
+ - Multi processing "n_cpu" setting for training is changed from "f0 extraction" to "data preprocessing and f0 extraction"
52
+ - Automatically detect the index paths under the logs folder and provide a drop-down list function
53
+ - Add "Frequently Asked Questions and Answers" on the tab page (you can also refer to github RVC wiki)
54
+ - 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)
55
+
56
+ ### 2023-05-14
57
+ - 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)
58
+ - 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)
59
+ - Resolve the issue of "connection errors" caused by the server's global proxy by setting environment variables
60
+ - 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)
61
+ - Limit excessive volume exceeding 1 before inference
62
+ - Slightly adjusted the settings of training-set preprocessing
63
+
64
+
65
+ #######################
66
+
67
+ History changelogs:
68
+
69
+ ### 2023-04-09
70
+ - 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
71
+ - Changed parameter: total batch_size is now per GPU batch_size
72
+ - Changed total_epoch: maximum limit increased from 100 to 1000; default increased from 10 to 20
73
+ - Fixed issue of ckpt extraction recognizing pitch incorrectly, causing abnormal inference
74
+ - Fixed issue of distributed training saving ckpt for each rank
75
+ - Applied nan feature filtering for feature extraction
76
+ - Fixed issue with silent input/output producing random consonants or noise (old models need to retrain with a new dataset)
77
+
78
+ ### 2023-04-16 Update
79
+ - Added local real-time voice changing mini-GUI, start by double-clicking go-realtime-gui.bat
80
+ - Applied filtering for frequency bands below 50Hz during training and inference
81
+ - 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
82
+ - 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)
83
+ - Fixed recognition of some GPUs (e.g., V100-16G recognition failure, P4 recognition failure)
84
+
85
+ ### 2023-04-28 Update
86
+ - Upgraded faiss index settings for faster speed and higher quality
87
+ - Removed dependency on total_npy; future model sharing will not require total_npy input
88
+ - Unlocked restrictions for the 16-series GPUs, providing 4GB inference settings for 4GB VRAM GPUs
89
+ - Fixed bug in UVR5 vocal accompaniment separation for certain audio formats
90
+ - Real-time voice changing mini-GUI now supports non-40k and non-lazy pitch models
91
+
92
+ ### Future Plans:
93
+ Features:
94
+ - Add option: extract small models for each epoch save
95
+ - Add option: export additional mp3 to the specified path during inference
96
+ - Support multi-person training tab (up to 4 people)
97
+
98
+ Base model:
99
+ - Collect breathing wav files to add to the training dataset to fix the issue of distorted breath sounds
100
+ - 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,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ Realtime Voice Conversion Software using RVC : [w-okada/voice-changer](https://github.com/w-okada/voice-changer)
28
+
29
+
30
+ > The dataset for the pre-training model uses nearly 50 hours of high quality VCTK open source dataset.
31
+
32
+ > High quality licensed song datasets will be added to training-set one after another for your use, without worrying about copyright infringement.
33
+
34
+ > 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.
35
+
36
+ ## Summary
37
+ This repository has the following features:
38
+ + Reduce tone leakage by replacing the source feature to training-set feature using top1 retrieval;
39
+ + Easy and fast training, even on relatively poor graphics cards;
40
+ + Training with a small amount of data also obtains relatively good results (>=10min low noise speech recommended);
41
+ + Supporting model fusion to change timbres (using ckpt processing tab->ckpt merge);
42
+ + Easy-to-use Webui interface;
43
+ + Use the UVR5 model to quickly separate vocals and instruments.
44
+ + 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.
45
+ + AMD/Intel graphics cards acceleration supported.
46
+ + Intel ARC graphics cards acceleration with IPEX supported.
47
+
48
+ ## Preparing the environment
49
+ The following commands need to be executed in the environment of Python version 3.8 or higher.
50
+
51
+ (Windows/Linux)
52
+ First install the main dependencies through pip:
53
+ ```bash
54
+ # Install PyTorch-related core dependencies, skip if installed
55
+ # Reference: https://pytorch.org/get-started/locally/
56
+ pip install torch torchvision torchaudio
57
+
58
+ #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
59
+ #pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
60
+ ```
61
+
62
+ Then can use poetry to install the other dependencies:
63
+ ```bash
64
+ # Install the Poetry dependency management tool, skip if installed
65
+ # Reference: https://python-poetry.org/docs/#installation
66
+ curl -sSL https://install.python-poetry.org | python3 -
67
+
68
+ # Install the project dependencies
69
+ poetry install
70
+ ```
71
+
72
+ You can also use pip to install them:
73
+ ```bash
74
+
75
+ for Nvidia graphics cards
76
+ pip install -r requirements.txt
77
+
78
+ for AMD/Intel graphics cards๏ผš
79
+ pip install -r requirements-dml.txt
80
+
81
+ for Intel ARC graphics cards on Linux / WSL using Python 3.10:
82
+ pip install -r requirements-ipex.txt
83
+
84
+ ```
85
+
86
+ ------
87
+ Mac users can install dependencies via `run.sh`:
88
+ ```bash
89
+ sh ./run.sh
90
+ ```
91
+
92
+ ## Preparation of other Pre-models
93
+ RVC requires other pre-models to infer and train.
94
+
95
+ You need to download them from our [Huggingface space](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/).
96
+
97
+ Here's a list of Pre-models and other files that RVC needs:
98
+ ```bash
99
+ ./assets/hubert/hubert_base.pt
100
+
101
+ ./assets/pretrained
102
+
103
+ ./assets/uvr5_weights
104
+
105
+ Additional downloads are required if you want to test the v2 version of the model.
106
+
107
+ ./assets/pretrained_v2
108
+
109
+ 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
110
+
111
+ ./assets/pretrained_v2
112
+
113
+ #If you are using Windows, you may also need these two files, skip if FFmpeg and FFprobe are installed
114
+ ffmpeg.exe
115
+
116
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe
117
+
118
+ ffprobe.exe
119
+
120
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe
121
+
122
+ 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
123
+
124
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.pt
125
+
126
+ For AMD/Intel graphics cards users you need download:
127
+
128
+ https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.onnx
129
+
130
+ ```
131
+
132
+ Intel ARC graphics cards users needs to run `source /opt/intel/oneapi/setvars.sh` command before starting Webui.
133
+
134
+ Then use this command to start Webui:
135
+ ```bash
136
+ python infer-web.py
137
+ ```
138
+ 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.
139
+
140
+ ## Credits
141
+ + [ContentVec](https://github.com/auspicious3000/contentvec/)
142
+ + [VITS](https://github.com/jaywalnut310/vits)
143
+ + [HIFIGAN](https://github.com/jik876/hifi-gan)
144
+ + [Gradio](https://github.com/gradio-app/gradio)
145
+ + [FFmpeg](https://github.com/FFmpeg/FFmpeg)
146
+ + [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
147
+ + [audio-slicer](https://github.com/openvpi/audio-slicer)
148
+ + [Vocal pitch extraction:RMVPE](https://github.com/Dream-High/RMVPE)
149
+ + The pretrained model is trained and tested by [yxlllc](https://github.com/yxlllc/RMVPE) and [RVC-Boss](https://github.com/RVC-Boss).
150
+
151
+ ## Thanks to all contributors for their efforts
152
+ <a href="https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/graphs/contributors" target="_blank">
153
+ <img src="https://contrib.rocks/image?repo=RVC-Project/Retrieval-based-Voice-Conversion-WebUI" />
154
+ </a>
155
+
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/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
+ - ๋ณด์ปฌ ํ›ˆ๋ จ ์„ธํŠธ์˜ ๊ธฐ๋ณธ ๋ชจ๋ธ์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•œ ์ž‘์—…์„ ์ง„ํ–‰์ค‘์ด๋ฉฐ, ์ด๋Š” ํ–ฅํ›„์— ๋ฐœํ‘œ๋  ์˜ˆ์ •.