From 53d54681cf1f5fd9e27f96e96ba0a3f90610f4df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?=
<41315874+fumiama@users.noreply.github.com>
Date: Fri, 21 Nov 2025 15:06:04 +0800
Subject: [PATCH] fix: i18n & dl & tests
---
.github/workflows/checksum.yml | 2 +-
.github/workflows/unitest.yml | 4 ++--
configs/config.py | 2 +-
i18n/locale/ja_JP.json | 2 +-
i18n/locale/zh_CN.json | 2 +-
infer/lib/rvcmd.py | 10 +---------
infer/modules/uvr5/modules.py | 4 ----
7 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/checksum.yml b/.github/workflows/checksum.yml
index 1bf904b..1fa0fbc 100644
--- a/.github/workflows/checksum.yml
+++ b/.github/workflows/checksum.yml
@@ -15,7 +15,7 @@ jobs:
- name: Run RVC-Models-Downloader
run: |
- wget https://github.com/fumiama/RVC-Models-Downloader/releases/download/v0.2.5/rvcmd_linux_amd64.deb
+ wget https://github.com/fumiama/RVC-Models-Downloader/releases/download/v0.2.11/rvcmd_linux_amd64.deb
sudo apt -y install ./rvcmd_linux_amd64.deb
rm -f ./rvcmd_linux_amd64.deb
rvcmd -notrs -w 1 -notui assets/rvc
diff --git a/.github/workflows/unitest.yml b/.github/workflows/unitest.yml
index 7a4987b..c02696d 100644
--- a/.github/workflows/unitest.yml
+++ b/.github/workflows/unitest.yml
@@ -18,13 +18,13 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
- wget https://github.com/fumiama/RVC-Models-Downloader/releases/download/v0.2.5/rvcmd_linux_amd64.deb
+ wget https://github.com/fumiama/RVC-Models-Downloader/releases/download/v0.2.11/rvcmd_linux_amd64.deb
sudo apt -y install ./rvcmd_linux_amd64.deb
pip install --force pip==24.0 # fix fairseq installing issue https://github.com/facebookresearch/fairseq/issues/5552
python -m pip install --upgrade setuptools
python -m pip install --upgrade wheel
pip install torch torchvision torchaudio
- pip install -r requirements/main.txt
+ pip install -r requirements/dml.txt
rvcmd -notrs -w 1 -notui assets/rvc
- name: Test step 1 & 2
run: |
diff --git a/configs/config.py b/configs/config.py
index 5232048..8a92f37 100644
--- a/configs/config.py
+++ b/configs/config.py
@@ -214,7 +214,7 @@ class Config(metaclass=Singleton):
self.use_fp32_config()
else:
logger.info("No supported Nvidia GPU found")
- self.device = self.instead = "cpu"
+ self.device = self.instead = torch.get_default_device()
self.is_half = False
self.use_fp32_config()
diff --git a/i18n/locale/ja_JP.json b/i18n/locale/ja_JP.json
index 455446b..c5c2a62 100644
--- a/i18n/locale/ja_JP.json
+++ b/i18n/locale/ja_JP.json
@@ -133,7 +133,7 @@
"Takeover WASAPI device": "WASAPIデバイスを独占",
"Target sample rate": "目標サンプリング率",
"The audio file to be processed": "処理待ち音声",
- "This software is licensed under the GNU Affero General Public License, version 3.0 or later.
The author has no control or responsibility regarding the use of this software.
Users who use the software and distribute any content, including sounds or files generated by it, bear full responsibility for compliance with the terms of the AGPL 3.0 license.
If you do not accept these terms, you are prohibited from using, referencing, or distributing any code or files contained within this software package.
Refer to the LICENSE file located in the root directory for full details.": "This software is licensed under the GNU Affero General Public License, version 3.0 or later.
The author has no control or responsibility regarding the use of this software.
Users who use the software and distribute any content, including sounds or files generated by it, bear full responsibility for compliance with the terms of the AGPL 3.0 license.
If you do not accept these terms, you are prohibited from using, referencing, or distributing any code or files contained within this software package.
Refer to the LICENSE file located in the root directory for full details.",
+ "This software is licensed under the GNU Affero General Public License, version 3.0 or later.
The author has no control or responsibility regarding the use of this software.
Users who use the software and distribute any content, including sounds or files generated by it, bear full responsibility for compliance with the terms of the AGPL 3.0 license.
If you do not accept these terms, you are prohibited from using, referencing, or distributing any code or files contained within this software package.
Refer to the LICENSE file located in the root directory for full details.": "本ソフトウェアは、GNU Affero General Public License バージョン3.0以降の下でライセンスされています。
作者は、このソフトウェアの使用に関して一切の管理権限や責任を負いません。
このソフトウェアを使用し、生成された音声やファイルを含むあらゆるコンテンツを配布するユーザーは、AGPL 3.0ライセンスの条項への準拠について全責任を負います。
これらの条項に同意しない場合、このソフトウェアパッケージに含まれるコードやファイルの使用、参照、配布は禁止されています。
詳細については、ルートディレクトリにあるLICENSEファイルを参照してください。",
"Total training epochs (total_epoch)": "総エポック数",
"Train": "学習",
"Train feature index": "特徴索引の学習",
diff --git a/i18n/locale/zh_CN.json b/i18n/locale/zh_CN.json
index aaa75ae..24367be 100644
--- a/i18n/locale/zh_CN.json
+++ b/i18n/locale/zh_CN.json
@@ -133,7 +133,7 @@
"Takeover WASAPI device": "独占 WASAPI 设备",
"Target sample rate": "目标采样率",
"The audio file to be processed": "待处理音频文件",
- "This software is licensed under the GNU Affero General Public License, version 3.0 or later.
The author has no control or responsibility regarding the use of this software.
Users who use the software and distribute any content, including sounds or files generated by it, bear full responsibility for compliance with the terms of the AGPL 3.0 license.
If you do not accept these terms, you are prohibited from using, referencing, or distributing any code or files contained within this software package.
Refer to the LICENSE file located in the root directory for full details.": "This software is licensed under the GNU Affero General Public License, version 3.0 or later.
The author has no control or responsibility regarding the use of this software.
Users who use the software and distribute any content, including sounds or files generated by it, bear full responsibility for compliance with the terms of the AGPL 3.0 license.
If you do not accept these terms, you are prohibited from using, referencing, or distributing any code or files contained within this software package.
Refer to the LICENSE file located in the root directory for full details.",
+ "This software is licensed under the GNU Affero General Public License, version 3.0 or later.
The author has no control or responsibility regarding the use of this software.
Users who use the software and distribute any content, including sounds or files generated by it, bear full responsibility for compliance with the terms of the AGPL 3.0 license.
If you do not accept these terms, you are prohibited from using, referencing, or distributing any code or files contained within this software package.
Refer to the LICENSE file located in the root directory for full details.": "本软件基于GNU Affero通用公共许可证3.0版本或更高版本进行许可。
作者对本软件的使用不承担任何控制权或责任。
使用本软件并分发任何内容(包括由其生成的声音或文件)的用户,需对遵守AGPL 3.0许可证条款承担全部责任。
如果您不接受这些条款,则禁止使用、引用或分发本软件包中包含的任何代码或文件。
请参阅位于根目录中的LICENSE文件以获取完整详情。",
"Total training epochs (total_epoch)": "总训练轮数total_epoch",
"Train": "训练",
"Train feature index": "训练特征索引",
diff --git a/infer/lib/rvcmd.py b/infer/lib/rvcmd.py
index 439e346..a2a3ce5 100644
--- a/infer/lib/rvcmd.py
+++ b/infer/lib/rvcmd.py
@@ -162,15 +162,7 @@ def download_and_extract_zip(url: str, folder: str):
logger.info(f"extracted into {folder}")
-def download_dns_yaml(url: str, folder: str):
- logger.info(f"downloading {url}")
- response = requests.get(url, stream=True, timeout=(5, 10))
- with open(os.path.join(folder, "dns.yaml"), "wb") as out_file:
- out_file.write(response.content)
- logger.info(f"downloaded into {folder}")
-
-
-def download_all_assets(tmpdir: str, version="0.2.5"):
+def download_all_assets(tmpdir: str, version="0.2.11"):
import subprocess
import platform
diff --git a/infer/modules/uvr5/modules.py b/infer/modules/uvr5/modules.py
index 7b3af7c..6053d11 100644
--- a/infer/modules/uvr5/modules.py
+++ b/infer/modules/uvr5/modules.py
@@ -62,10 +62,6 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
os.path.basename(inp_path),
)
resample_audio(inp_path, tmp_path, "pcm_s16le", "s16", 44100, "stereo")
- try: # Remove the original file
- os.remove(inp_path)
- except Exception as e:
- print(f"Failed to remove the original file: {e}")
inp_path = tmp_path
try:
if done == 0: