#5830 [ChatTTS] 该渠道需另行部署并启动后可用self.api_url='http://127.0.0.1:9966'

113.128* Posted at: 1 hour ago

[ChatTTS] 该渠道需另行部署并启动后可用
self.api_url='http://127.0.0.1:9966'
:
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=9966): 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\_chattts.py", line 28, 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=9966): 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 207, in run
File "videotrans\tts\_base.py", line 93, in run
File "videotrans\tts\_base.py", line 208, in _exec
File "videotrans\tts\_base.py", line 168, in _local_mul_thread
File "videotrans\tts\_base.py", line 220, in _item_task
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_chattts.py", line 31, in _run
videotrans.configure.excepts.StopTask: [ChatTTS] 该渠道需另行部署并启动后可用
self.api_url='http://127.0.0.1:9966'


=
system:Windows-10-10.0.26100-SP0
version:v4.05
frozen:True
language:zh
root_dir:E:/soft_run/win-videotrans

1 Replies

这是由于 ChatTTS 服务未在本机运行导致的连接拒绝。该渠道需要您先在本地自行部署并启动 ChatTTS 服务,pyVideoTrans 才能通过 http://127.0.0.1:9966 调用它。

  1. 部署 ChatTTS:请参考 ChatTTS 官方仓库或相关教程,在您的电脑上安装并运行 ChatTTS 服务(默认端口 9966)。
  2. 验证服务:启动后,在浏览器访问 http://127.0.0.1:9966/tts,确认能够正常返回响应。
  3. 重新执行视频翻译:回到 pyVideoTrans,再次点击“开始”即可。

如果不想自行部署 ChatTTS,可改用 Edge-TTS(免费、开箱即用),无需任何额外配置。

请查阅相关文档:

Post Your Reply
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

Dondate via PayPal

Related resource