diff --git a/.github/workflows/checksum.yml b/.github/workflows/checksum.yml index dd7f91167..11ff840e0 100644 --- a/.github/workflows/checksum.yml +++ b/.github/workflows/checksum.yml @@ -13,7 +13,7 @@ jobs: - name: Run RVC-Models-Downloader run: | - wget https://github.com/fumiama/RVC-Models-Downloader/releases/download/v0.2.9/rvcmd_linux_amd64.deb + wget https://github.com/fumiama/RVC-Models-Downloader/releases/download/v0.2.10/rvcmd_linux_amd64.deb sudo apt -y install ./rvcmd_linux_amd64.deb rm -f ./rvcmd_linux_amd64.deb rvcmd -notrs -w 1 -notui assets/chtts diff --git a/ChatTTS/core.py b/ChatTTS/core.py index 28cebd92a..60d68c494 100644 --- a/ChatTTS/core.py +++ b/ChatTTS/core.py @@ -74,7 +74,7 @@ def download_models( or force_redownload ): with tempfile.TemporaryDirectory() as tmp: - download_all_assets(tmpdir=tmp) + download_all_assets(tmpdir=tmp, homedir=download_path) if not check_all_assets( Path(download_path), self.sha256_map, update=False ): diff --git a/ChatTTS/utils/dl.py b/ChatTTS/utils/dl.py index 68a1cabe5..a17dd97c6 100644 --- a/ChatTTS/utils/dl.py +++ b/ChatTTS/utils/dl.py @@ -151,7 +151,7 @@ def download_dns_yaml(url: str, folder: str, headers: Dict[str, str]): logger.get_logger().info(f"downloaded into {folder}") -def download_all_assets(tmpdir: str, version="0.2.9"): +def download_all_assets(tmpdir: str, homedir: str, version="0.2.10"): import subprocess import platform @@ -186,7 +186,7 @@ def download_all_assets(tmpdir: str, version="0.2.9"): else: download_and_extract_tar_gz(RVCMD_URL, tmpdir) os.chmod(cmdfile, 0o755) - subprocess.run([cmdfile, "-notui", "-w", "0", "assets/chtts"]) + subprocess.run([cmdfile, "-notui", "-w", "0", "-H", homedir, "assets/chtts"]) except Exception: BASE_URL = ( "https://gitea.seku.su/fumiama/RVC-Models-Downloader/releases/download/" @@ -215,6 +215,7 @@ def download_all_assets(tmpdir: str, version="0.2.9"): "0", "-dns", os.path.join(tmpdir, "dns.yaml"), + "-H", homedir, "assets/chtts", ] )