{}
diff --git a/tools/my_utils.py b/tools/my_utils.py
index d26a372e..04f1a98a 100644
--- a/tools/my_utils.py
+++ b/tools/my_utils.py
@@ -109,7 +109,7 @@ def check_details(path_list=None, is_train=False, is_dataset_processing=False):
if os.path.exists(wav_path):
...
else:
- gr.Warning(wav_path+i18n("路径错误"))
+ gr.Warning(wav_path + i18n("路径错误"))
return
if is_train:
path_list.append(os.path.join(path_list[0], "2-name2text.txt"))
diff --git a/tools/subfix_webui.py b/tools/subfix_webui.py
index 3f2fd03e..51a7dfad 100644
--- a/tools/subfix_webui.py
+++ b/tools/subfix_webui.py
@@ -1,5 +1,6 @@
import sys
from tools.i18n.i18n import I18nAuto, scan_language_list
+
language = sys.argv[-1] if sys.argv[-1] in scan_language_list() else "Auto"
i18n = I18nAuto(language=language)
import argparse
@@ -309,7 +310,9 @@ if __name__ == "__main__":
with gr.Blocks(analytics_enabled=False) as demo:
gr.Markdown(
- value=i18n("Submit Text: 将当前页所有文本框内容手工保存到内存和文件(翻页前后或者退出标注页面前如果没点这个按钮,你再翻回来就回滚了,白忙活。)")
+ value=i18n(
+ "Submit Text: 将当前页所有文本框内容手工保存到内存和文件(翻页前后或者退出标注页面前如果没点这个按钮,你再翻回来就回滚了,白忙活。)"
+ )
)
with gr.Row():
btn_change_index = gr.Button("Change Index")
diff --git a/tools/uvr5/mdxnet.py b/tools/uvr5/mdxnet.py
index 6548ce24..98c75c1f 100644
--- a/tools/uvr5/mdxnet.py
+++ b/tools/uvr5/mdxnet.py
@@ -190,14 +190,14 @@ class Predictor:
opt_path_vocal = path_vocal[:-4] + ".%s" % format
opt_path_other = path_other[:-4] + ".%s" % format
if os.path.exists(path_vocal):
- os.system("ffmpeg -i \"%s\" -vn \"%s\" -q:a 2 -y" % (path_vocal, opt_path_vocal))
+ os.system('ffmpeg -i "%s" -vn "%s" -q:a 2 -y' % (path_vocal, opt_path_vocal))
if os.path.exists(opt_path_vocal):
try:
os.remove(path_vocal)
except:
pass
if os.path.exists(path_other):
- os.system("ffmpeg -i \"%s\" -vn \"%s\" -q:a 2 -y" % (path_other, opt_path_other))
+ os.system('ffmpeg -i "%s" -vn "%s" -q:a 2 -y' % (path_other, opt_path_other))
if os.path.exists(opt_path_other):
try:
os.remove(path_other)
diff --git a/tools/uvr5/vr.py b/tools/uvr5/vr.py
index 8f24ca6a..45429cca 100644
--- a/tools/uvr5/vr.py
+++ b/tools/uvr5/vr.py
@@ -140,7 +140,7 @@ class AudioPre:
)
if os.path.exists(path):
opt_format_path = path[:-4] + ".%s" % format
- cmd="ffmpeg -i \"%s\" -vn \"%s\" -q:a 2 -y" % (path, opt_format_path)
+ cmd = 'ffmpeg -i "%s" -vn "%s" -q:a 2 -y' % (path, opt_format_path)
print(cmd)
os.system(cmd)
if os.path.exists(opt_format_path):
@@ -177,7 +177,7 @@ class AudioPre:
)
if os.path.exists(path):
opt_format_path = path[:-4] + ".%s" % format
- cmd="ffmpeg -i \"%s\" -vn \"%s\" -q:a 2 -y" % (path, opt_format_path)
+ cmd = 'ffmpeg -i "%s" -vn "%s" -q:a 2 -y' % (path, opt_format_path)
print(cmd)
os.system(cmd)
if os.path.exists(opt_format_path):
@@ -307,7 +307,7 @@ class AudioPreDeEcho:
)
if os.path.exists(path):
opt_format_path = path[:-4] + ".%s" % format
- cmd="ffmpeg -i \"%s\" -vn \"%s\" -q:a 2 -y" % (path, opt_format_path)
+ cmd = 'ffmpeg -i "%s" -vn "%s" -q:a 2 -y' % (path, opt_format_path)
print(cmd)
os.system(cmd)
if os.path.exists(opt_format_path):
@@ -340,7 +340,7 @@ class AudioPreDeEcho:
)
if os.path.exists(path):
opt_format_path = path[:-4] + ".%s" % format
- cmd="ffmpeg -i \"%s\" -vn \"%s\" -q:a 2 -y" % (path, opt_format_path)
+ cmd = 'ffmpeg -i "%s" -vn "%s" -q:a 2 -y' % (path, opt_format_path)
print(cmd)
os.system(cmd)
if os.path.exists(opt_format_path):
diff --git a/webui.py b/webui.py
index 0e34987a..9981cfcc 100644
--- a/webui.py
+++ b/webui.py
@@ -507,7 +507,7 @@ def open1Ba(
):
global p_train_SoVITS
if p_train_SoVITS == None:
- exp_name=exp_name.rstrip(" ")
+ exp_name = exp_name.rstrip(" ")
config_file = (
"GPT_SoVITS/configs/s2.json"
if version not in {"v2Pro", "v2ProPlus"}
@@ -604,7 +604,7 @@ def open1Bb(
):
global p_train_GPT
if p_train_GPT == None:
- exp_name=exp_name.rstrip(" ")
+ exp_name = exp_name.rstrip(" ")
with open(
"GPT_SoVITS/configs/s1longer.yaml" if version == "v1" else "GPT_SoVITS/configs/s1longer-v2.yaml"
) as f:
From d46c069e52caa0d75b5d1119b7dd918322e7b590 Mon Sep 17 00:00:00 2001
From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com>
Date: Wed, 18 Jun 2025 10:38:54 +0800
Subject: [PATCH 4/8] Remove Debug Code (#2471)
---
install.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/install.sh b/install.sh
index e6112bd3..c3d20852 100644
--- a/install.sh
+++ b/install.sh
@@ -33,7 +33,7 @@ on_error() {
run_conda_quiet() {
local output
- output=$(conda install --yes --quiet "$@" 2>&1) || {
+ output=$(conda install --yes --quiet -c conda-forge "$@" 2>&1) || {
echo -e "${ERROR} Conda install failed:\n$output"
exit 1
}
@@ -60,8 +60,6 @@ if ! command -v conda &>/dev/null; then
exit 1
fi
-run_conda_quiet gcc
-
USE_CUDA=false
USE_ROCM=false
USE_CPU=false
From 4987df5a71696cb1333fc4c2108cc3491c4e64f5 Mon Sep 17 00:00:00 2001
From: Ella Zhang <144317607+EllaZhangCA@users.noreply.github.com>
Date: Thu, 19 Jun 2025 15:34:11 +0800
Subject: [PATCH 5/8] fixed syntax errors in api_v2.py (#2473)
---
api_v2.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/api_v2.py b/api_v2.py
index 87082074..5947df53 100644
--- a/api_v2.py
+++ b/api_v2.py
@@ -33,14 +33,14 @@ POST:
"text_split_method": "cut0", # str. text split method, see text_segmentation_method.py for details.
"batch_size": 1, # int. batch size for inference
"batch_threshold": 0.75, # float. threshold for batch splitting.
- "split_bucket: True, # bool. whether to split the batch into multiple buckets.
+ "split_bucket": True, # bool. whether to split the batch into multiple buckets.
"speed_factor":1.0, # float. control the speed of the synthesized audio.
"streaming_mode": False, # bool. whether to return a streaming response.
"seed": -1, # int. random seed for reproducibility.
"parallel_infer": True, # bool. whether to use parallel inference.
- "repetition_penalty": 1.35 # float. repetition penalty for T2S model.
+ "repetition_penalty": 1.35, # float. repetition penalty for T2S model.
"sample_steps": 32, # int. number of sampling steps for VITS model V3.
- "super_sampling": False, # bool. whether to use super-sampling for audio when using VITS model V3.
+ "super_sampling": False # bool. whether to use super-sampling for audio when using VITS model V3.
}
```
From 37f5abfcb4a6553652235909db2e124b6f8ff3a5 Mon Sep 17 00:00:00 2001
From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com>
Date: Wed, 25 Jun 2025 14:52:27 +0800
Subject: [PATCH 6/8] Fix Issues with libstdcxx and conda sysroot (#2482)
---
install.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/install.sh b/install.sh
index c3d20852..ea8d2e2d 100644
--- a/install.sh
+++ b/install.sh
@@ -170,7 +170,13 @@ if ! $USE_HF && ! $USE_HF_MIRROR && ! $USE_MODELSCOPE; then
exit 1
fi
-# 安装构建工具
+case "$(uname -m)" in
+ x86_64|amd64) SYSROOT_PKG="sysroot_linux-64>=2.28" ;;
+ aarch64|arm64) SYSROOT_PKG="sysroot_linux-aarch64>=2.28" ;;
+ ppc64le) SYSROOT_PKG="sysroot_linux-ppc64le>=2.28" ;;
+ *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
+esac
+
# Install build tools
echo -e "${INFO}Detected system: $(uname -s) $(uname -r) $(uname -m)"
if [ "$(uname)" != "Darwin" ]; then
@@ -178,10 +184,14 @@ if [ "$(uname)" != "Darwin" ]; then
if [ "$gcc_major_version" -lt 11 ]; then
echo -e "${INFO}Installing GCC & G++..."
run_conda_quiet gcc=11 gxx=11
+ run_conda_quiet "$SYSROOT_PKG"
echo -e "${SUCCESS}GCC & G++ Installed..."
else
echo -e "${INFO}Detected GCC Version: $gcc_major_version"
echo -e "${INFO}Skip Installing GCC & G++ From Conda-Forge"
+ echo -e "${INFO}Installing libstdcxx-ng From Conda-Forge"
+ run_conda_quiet "libstdcxx-ng>=$gcc_major_version"
+ echo -e "${SUCCESS}libstdcxx-ng=$gcc_major_version Installed..."
fi
else
if ! xcode-select -p &>/dev/null; then
From 4839e8214862808bea45b86c7c26ff643b0175ee Mon Sep 17 00:00:00 2001
From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com>
Date: Fri, 27 Jun 2025 01:04:18 +0800
Subject: [PATCH 7/8] Add Windows Install Powershell Scripts (#2487)
---
README.md | 8 ++
docs/cn/README.md | 6 ++
docs/ko/README.md | 6 ++
docs/tr/README.md | 6 ++
install.ps1 | 241 ++++++++++++++++++++++++++++++++++++++++++++++
install.sh | 28 +++---
6 files changed, 283 insertions(+), 12 deletions(-)
create mode 100644 install.ps1
diff --git a/README.md b/README.md
index 978bb3ca..e67288ea 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,14 @@ If you are a Windows user (tested with win>=10), you can [download the integrate
**Users in China can [download the package here](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#KTvnO).**
+Install the program by running the following commands:
+
+```pwsh
+conda create -n GPTSoVits python=3.10
+conda activate GPTSoVits
+pwsh -F install.ps1 --Device
--Source [--DownloadUVR5]
+```
+
### Linux
```bash
diff --git a/docs/cn/README.md b/docs/cn/README.md
index 70ce4285..77841b99 100644
--- a/docs/cn/README.md
+++ b/docs/cn/README.md
@@ -62,6 +62,12 @@
**中国地区的用户可以[在此处下载整合包](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#KTvnO).**
+```pwsh
+conda create -n GPTSoVits python=3.10
+conda activate GPTSoVits
+pwsh -F install.ps1 --Device --Source [--DownloadUVR5]
+```
+
### Linux
```bash
diff --git a/docs/ko/README.md b/docs/ko/README.md
index bfc70395..1028c00a 100644
--- a/docs/ko/README.md
+++ b/docs/ko/README.md
@@ -58,6 +58,12 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-
Windows 사용자라면 (win>=10에서 테스트됨), [통합 패키지를 다운로드](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-v3lora-20250228.7z?download=true)한 후 압축을 풀고 _go-webui.bat_ 파일을 더블 클릭하면 GPT-SoVITS-WebUI를 시작할 수 있습니다.
+```pwsh
+conda create -n GPTSoVits python=3.10
+conda activate GPTSoVits
+pwsh -F install.ps1 --Device --Source [--DownloadUVR5]
+```
+
### Linux
```bash
diff --git a/docs/tr/README.md b/docs/tr/README.md
index 2ce02b60..dd5d79b3 100644
--- a/docs/tr/README.md
+++ b/docs/tr/README.md
@@ -58,6 +58,12 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-
Eğer bir Windows kullanıcısıysanız (win>=10 ile test edilmiştir), [entegre paketi indirin](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-v3lora-20250228.7z?download=true) ve _go-webui.bat_ dosyasına çift tıklayarak GPT-SoVITS-WebUI'yi başlatın.
+```pwsh
+conda create -n GPTSoVits python=3.10
+conda activate GPTSoVits
+pwsh -F install.ps1 --Device --Source [--DownloadUVR5]
+```
+
### Linux
```bash
diff --git a/install.ps1 b/install.ps1
new file mode 100644
index 00000000..9c33ace8
--- /dev/null
+++ b/install.ps1
@@ -0,0 +1,241 @@
+Param (
+ [Parameter(Mandatory=$true)][ValidateSet("CU126", "CU128", "CPU")][string]$Device,
+ [Parameter(Mandatory=$true)][ValidateSet("HF", "HF-Mirror", "ModelScope")][string]$Source,
+ [switch]$DownloadUVR5
+)
+
+$global:ErrorActionPreference = 'Stop'
+
+trap {
+ Write-ErrorLog $_
+}
+
+function Write-ErrorLog {
+ param (
+ [System.Management.Automation.ErrorRecord]$ErrorRecord
+ )
+
+ Write-Host "`n[ERROR] Command failed:" -ForegroundColor Red
+ if (-not $ErrorRecord.Exception.Message){
+ } else {
+ Write-Host "Message:" -ForegroundColor Red
+ $ErrorRecord.Exception.Message -split "`n" | ForEach-Object {
+ Write-Host " $_"
+ }
+ }
+
+ Write-Host "Command:" -ForegroundColor Red -NoNewline
+ Write-Host " $($ErrorRecord.InvocationInfo.Line)".Replace("`r", "").Replace("`n", "")
+ Write-Host "Location:" -ForegroundColor Red -NoNewline
+ Write-Host " $($ErrorRecord.InvocationInfo.ScriptName):$($ErrorRecord.InvocationInfo.ScriptLineNumber)"
+ Write-Host "Call Stack:" -ForegroundColor DarkRed
+ $ErrorRecord.ScriptStackTrace -split "`n" | ForEach-Object {
+ Write-Host " $_" -ForegroundColor DarkRed
+ }
+
+ exit 1
+}
+
+function Write-Info($msg) {
+ Write-Host "[INFO]:" -ForegroundColor Green -NoNewline
+ Write-Host " $msg"
+}
+function Write-Success($msg) {
+ Write-Host "[SUCCESS]:" -ForegroundColor Blue -NoNewline
+ Write-Host " $msg"
+}
+
+
+function Invoke-Conda {
+ param (
+ [Parameter(ValueFromRemainingArguments = $true)]
+ [string[]]$Args
+ )
+
+ $output = & conda install -y -q -c conda-forge @Args 2>&1
+ $exitCode = $LASTEXITCODE
+
+ if ($exitCode -ne 0) {
+ Write-Host "Conda Install $Args Failed" -ForegroundColor Red
+ $errorMessages = @()
+ foreach ($item in $output) {
+ if ($item -is [System.Management.Automation.ErrorRecord]) {
+ $msg = $item.Exception.Message
+ Write-Host "$msg" -ForegroundColor Red
+ $errorMessages += $msg
+ }
+ else {
+ Write-Host $item
+ $errorMessages += $item
+ }
+ }
+ throw [System.Exception]::new(($errorMessages -join "`n"))
+ }
+}
+
+function Invoke-Pip {
+ param (
+ [Parameter(ValueFromRemainingArguments = $true)]
+ [string[]]$Args
+ )
+
+ $output = & pip install @Args 2>&1
+ $exitCode = $LASTEXITCODE
+
+ if ($exitCode -ne 0) {
+ $errorMessages = @()
+ Write-Host "Pip Install $Args Failed" -ForegroundColor Red
+ foreach ($item in $output) {
+ if ($item -is [System.Management.Automation.ErrorRecord]) {
+ $msg = $item.Exception.Message
+ Write-Host "$msg" -ForegroundColor Red
+ $errorMessages += $msg
+ }
+ else {
+ Write-Host $item
+ $errorMessages += $item
+ }
+ }
+ throw [System.Exception]::new(($errorMessages -join "`n"))
+ }
+}
+
+function Invoke-Download {
+ param (
+ [Parameter(Mandatory = $true)]
+ [string]$Uri,
+
+ [Parameter()]
+ [string]$OutFile
+ )
+
+ try {
+ $params = @{
+ Uri = $Uri
+ }
+
+ if ($OutFile) {
+ $params["OutFile"] = $OutFile
+ }
+
+ $null = Invoke-WebRequest @params -ErrorAction Stop
+
+ } catch {
+ Write-Host "Failed to download:" -ForegroundColor Red
+ Write-Host " $Uri"
+ throw
+ }
+}
+
+function Invoke-Unzip {
+ param($ZipPath, $DestPath)
+ Expand-Archive -Path $ZipPath -DestinationPath $DestPath -Force
+ Remove-Item $ZipPath -Force
+}
+
+chcp 65001
+Set-Location $PSScriptRoot
+
+Write-Info "Installing FFmpeg & CMake..."
+Invoke-Conda ffmpeg cmake
+Write-Success "FFmpeg & CMake Installed"
+
+$PretrainedURL = ""
+$G2PWURL = ""
+$UVR5URL = ""
+$NLTKURL = ""
+$OpenJTalkURL = ""
+
+switch ($Source) {
+ "HF" {
+ Write-Info "Download Model From HuggingFace"
+ $PretrainedURL = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/pretrained_models.zip"
+ $G2PWURL = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip"
+ $UVR5URL = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/uvr5_weights.zip"
+ $NLTKURL = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/nltk_data.zip"
+ $OpenJTalkURL = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/open_jtalk_dic_utf_8-1.11.tar.gz"
+ }
+ "HF-Mirror" {
+ Write-Info "Download Model From HuggingFace-Mirror"
+ $PretrainedURL = "https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/pretrained_models.zip"
+ $G2PWURL = "https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip"
+ $UVR5URL = "https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/uvr5_weights.zip"
+ $NLTKURL = "https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/nltk_data.zip"
+ $OpenJTalkURL = "https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/open_jtalk_dic_utf_8-1.11.tar.gz"
+ }
+ "ModelScope" {
+ Write-Info "Download Model From ModelScope"
+ $PretrainedURL = "https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/pretrained_models.zip"
+ $G2PWURL = "https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip"
+ $UVR5URL = "https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/uvr5_weights.zip"
+ $NLTKURL = "https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/nltk_data.zip"
+ $OpenJTalkURL = "https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/open_jtalk_dic_utf_8-1.11.tar.gz"
+ }
+}
+
+if (-not (Test-Path "GPT_SoVITS/pretrained_models/sv")) {
+ Write-Info "Downloading Pretrained Models..."
+ Invoke-Download -Uri $PretrainedURL -OutFile "pretrained_models.zip"
+ Invoke-Unzip "pretrained_models.zip" "GPT_SoVITS"
+ Write-Success "Pretrained Models Downloaded"
+} else {
+ Write-Info "Pretrained Model Exists"
+ Write-Info "Skip Downloading Pretrained Models"
+}
+
+
+if (-not (Test-Path "GPT_SoVITS/text/G2PWModel")) {
+ Write-Info "Downloading G2PWModel..."
+ Invoke-Download -Uri $G2PWURL -OutFile "G2PWModel.zip"
+ Invoke-Unzip "G2PWModel.zip" "GPT_SoVITS/text"
+ Write-Success "G2PWModel Downloaded"
+} else {
+ Write-Info "G2PWModel Exists"
+ Write-Info "Skip Downloading G2PWModel"
+}
+
+if ($DownloadUVR5) {
+ if (-not (Test-Path "tools/uvr5/uvr5_weights")) {
+ Write-Info "Downloading UVR5 Models..."
+ Invoke-Download -Uri $UVR5URL -OutFile "uvr5_weights.zip"
+ Invoke-Unzip "uvr5_weights.zip" "tools/uvr5"
+ Write-Success "UVR5 Models Downloaded"
+ } else {
+ Write-Info "UVR5 Models Exists"
+ Write-Info "Skip Downloading UVR5 Models"
+ }
+}
+
+switch ($Device) {
+ "CU128" {
+ Write-Info "Installing PyTorch For CUDA 12.8..."
+ Invoke-Pip torch torchaudio --index-url "https://download.pytorch.org/whl/cu128"
+ }
+ "CU126" {
+ Write-Info "Installing PyTorch For CUDA 12.6..."
+ Invoke-Pip torch torchaudio --index-url "https://download.pytorch.org/whl/cu126"
+ }
+ "CPU" {
+ Write-Info "Installing PyTorch For CPU..."
+ Invoke-Pip torch torchaudio --index-url "https://download.pytorch.org/whl/cpu"
+ }
+}
+Write-Success "PyTorch Installed"
+
+Write-Info "Installing Python Dependencies From requirements.txt..."
+Invoke-Pip -r extra-req.txt --no-deps
+Invoke-Pip -r requirements.txt
+Write-Success "Python Dependencies Installed"
+
+Write-Info "Downloading NLTK Data..."
+Invoke-Download -Uri $NLTKURL -OutFile "nltk_data.zip"
+Invoke-Unzip "nltk_data.zip" (python -c "import sys; print(sys.prefix)").Trim()
+
+Write-Info "Downloading Open JTalk Dict..."
+Invoke-Download -Uri $OpenJTalkURL -OutFile "open_jtalk_dic_utf_8-1.11.tar.gz"
+$target = (python -c "import os, pyopenjtalk; print(os.path.dirname(pyopenjtalk.__file__))").Trim()
+tar -xzf open_jtalk_dic_utf_8-1.11.tar.gz -C $target
+Remove-Item "open_jtalk_dic_utf_8-1.11.tar.gz" -Force
+Write-Success "Open JTalk Dic Downloaded"
+
+Write-Success "Installation Completed"
diff --git a/install.sh b/install.sh
index ea8d2e2d..a2fa751e 100644
--- a/install.sh
+++ b/install.sh
@@ -48,11 +48,12 @@ run_pip_quiet() {
}
run_wget_quiet() {
- local output
- output=$(wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$@" 2>&1) || {
- echo -e "${ERROR} Wget failed:\n$output"
+ if wget --tries=25 --wait=5 --read-timeout=40 -q --show-progress "$@" 2>&1; then
+ tput cuu1 && tput el
+ else
+ echo -e "${ERROR} Wget failed"
exit 1
- }
+ fi
}
if ! command -v conda &>/dev/null; then
@@ -171,10 +172,13 @@ if ! $USE_HF && ! $USE_HF_MIRROR && ! $USE_MODELSCOPE; then
fi
case "$(uname -m)" in
- x86_64|amd64) SYSROOT_PKG="sysroot_linux-64>=2.28" ;;
- aarch64|arm64) SYSROOT_PKG="sysroot_linux-aarch64>=2.28" ;;
- ppc64le) SYSROOT_PKG="sysroot_linux-ppc64le>=2.28" ;;
- *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
+x86_64 | amd64) SYSROOT_PKG="sysroot_linux-64>=2.28" ;;
+aarch64 | arm64) SYSROOT_PKG="sysroot_linux-aarch64>=2.28" ;;
+ppc64le) SYSROOT_PKG="sysroot_linux-ppc64le>=2.28" ;;
+*)
+ echo "Unsupported architecture: $(uname -m)"
+ exit 1
+ ;;
esac
# Install build tools
@@ -248,10 +252,7 @@ elif [ "$USE_MODELSCOPE" = "true" ]; then
PYOPENJTALK_URL="https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/open_jtalk_dic_utf_8-1.11.tar.gz"
fi
-if find -L "GPT_SoVITS/pretrained_models" -mindepth 1 ! -name '.gitignore' | grep -q .; then
- echo -e "${INFO}Pretrained Model Exists"
- echo -e "${INFO}Skip Downloading Pretrained Models"
-else
+if [ ! -d "GPT_SoVITS/pretrained_models/sv" ]; then
echo -e "${INFO}Downloading Pretrained Models..."
rm -rf pretrained_models.zip
run_wget_quiet "$PRETRINED_URL"
@@ -259,6 +260,9 @@ else
unzip -q -o pretrained_models.zip -d GPT_SoVITS
rm -rf pretrained_models.zip
echo -e "${SUCCESS}Pretrained Models Downloaded"
+else
+ echo -e "${INFO}Pretrained Model Exists"
+ echo -e "${INFO}Skip Downloading Pretrained Models"
fi
if [ ! -d "GPT_SoVITS/text/G2PWModel" ]; then
From 90ebefa78fd544da36eebe0b2003620879c921b0 Mon Sep 17 00:00:00 2001
From: KamioRinn <63162909+KamioRinn@users.noreply.github.com>
Date: Fri, 27 Jun 2025 10:41:52 +0800
Subject: [PATCH 8/8] make sure ort providers available (#2489)
---
GPT_SoVITS/text/g2pw/onnx_api.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/GPT_SoVITS/text/g2pw/onnx_api.py b/GPT_SoVITS/text/g2pw/onnx_api.py
index 52eed443..1d5e4231 100644
--- a/GPT_SoVITS/text/g2pw/onnx_api.py
+++ b/GPT_SoVITS/text/g2pw/onnx_api.py
@@ -93,13 +93,13 @@ class G2PWOnnxConverter:
sess_options.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_ENABLE_ALL
sess_options.execution_mode = onnxruntime.ExecutionMode.ORT_SEQUENTIAL
sess_options.intra_op_num_threads = 2 if torch.cuda.is_available() else 0
- try:
+ if "CUDAExecutionProvider" in onnxruntime.get_available_providers():
self.session_g2pW = onnxruntime.InferenceSession(
os.path.join(uncompress_path, "g2pW.onnx"),
sess_options=sess_options,
providers=["CUDAExecutionProvider", "CPUExecutionProvider"],
)
- except:
+ else:
self.session_g2pW = onnxruntime.InferenceSession(
os.path.join(uncompress_path, "g2pW.onnx"),
sess_options=sess_options,