#8426 [GPT-SoVITS] 该渠道需另行部署并启动后可用:

222.168**2 Posted at: 1 hour ago

[GPT-SoVITS] 该渠道需另行部署并启动后可用
:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': 'Me1.wav', 'filename': 'D:/videotrans/tmp/16416/1792819356.394091-gptsovits.wav', 'tts_type': 13}
Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 85, in create_connection
File "urllib3\util\connection.py", line 73, in create_connection
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 493, in _make_request
File "urllib3\connection.py", line 494, in request
File "http\client.py", line 1278, in endheaders
File "http\client.py", line 1038, in _send_output
File "http\client.py", line 976, in send
File "urllib3\connection.py", line 325, in connect
File "urllib3\connection.py", line 213, in _new_conn
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "requests\adapters.py", line 644, in send
File "urllib3\connectionpool.py", line 841, in urlopen
File "urllib3\util\retry.py", line 519, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=9880): Max retries exceeded with url: /tts (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\tts\_gptsovits.py", line 79, in _run
File "requests\api.py", line 115, in post
File "requests\api.py", line 59, in request
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 677, in send
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9880): Max retries exceeded with url: /tts (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 132, in run
File "videotrans\tts\_base.py", line 98, in run
File "videotrans\tts\_base.py", line 201, in _exec
File "videotrans\tts\_base.py", line 161, in _local_mul_thread
File "videotrans\tts\_base.py", line 216, in _item_task
File "videotrans\tts\_gptsovits.py", line 82, in _run
videotrans.configure.excepts.StopTask: [GPT-SoVITS] 该渠道需另行部署并启动后可用


=
system:Windows-10-10.0.26300-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:D:/videotrans

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:本机 127.0.0.1:9880 没有任何服务在监听,即 GPT-SoVITS 的 API 服务未启动(或启动的端口/API 版本与软件中填写的不一致)。GPT-SoVITS 属于"本地API"渠道,pyVideoTrans 自身不内置该模型,必须另行部署并启动 API 后才能调用。

解决步骤:

  1. 启动 GPT-SoVITS 的 API 服务(不是 WebUI)。在 GPT-SoVITS 项目目录下运行其 api.py(v2 版本则运行 api_v2.py),保持该命令行窗口不要关闭;关掉窗口 = 服务停止。
  2. 核对 API 版本勾选:

    • 启动的是 api.py → 软件中「GPT-SoVITS 设置」里不要勾选 api_v2?
    • 启动的是 api_v2.py → 必须勾选 api_v2?
      两者不一致会报 {"detail":"Not Found"} 或连接类错误。
  3. 核对地址端口:软件中应填写 http://127.0.0.1:9880(9880 是 API 端口)。不要填 7860——那是 GPT-SoVITS 的 WebUI 端口,填了必然连不上。
  4. 验证服务是否真的起来了:浏览器打开 http://127.0.0.1:9880/docs,能出现接口文档页面说明服务正常;打不开就是服务未启动或端口被改。
  5. 若端口被占用改用其他端口(如 9881),需同步修改软件中的地址为 http://127.0.0.1:9881。
  6. 127.0.0.1 本地地址不走代理,无需在软件"网络代理"中做特殊配置;但如果你的系统级代理软件接管了本地回环流量,可临时关闭代理再试。
  7. 只是想先跑通流程验证其他环节:可把配音渠道临时换成 Edge-TTS(免费),配音角色选一个目标语言对应音色,确认整条链路正常后再回头调 GPT-SoVITS。

补充说明:报错中的 role: 'Me1.wav' 属于你在「TTS设置 → 设置参考音频」中配置的自定义参考音频角色,与本次连接失败无关。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource