#5091 TaskCfgTTS(uuid='9872a8098a', name='H:/PY/py-software/pyvideotrans/tmp/18252/20260609-221411.txt', dirname='H:/PY/py-sof

2409:8a55* Posted at: 21 hours ago

配音阶段出错 [自定义TTS API] 网络连接失败
Traceback (most recent call last):

File "urllib3\connectionpool.py", line 787, in urlopen

File "urllib3\connectionpool.py", line 534, in _make_request

File "urllib3\connection.py", line 565, in getresponse

File "http\client.py", line 1375, in getresponse

File "http\client.py", line 318, in begin

File "http\client.py", line 287, in _read_status

http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

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 474, in increment

File "urllib3\util\util.py", line 38, in reraise

File "urllib3\connectionpool.py", line 787, in urlopen

File "urllib3\connectionpool.py", line 534, in _make_request

File "urllib3\connection.py", line 565, in getresponse

File "http\client.py", line 1375, in getresponse

File "http\client.py", line 318, in begin

File "http\client.py", line 287, in _read_status

urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 154, in process_task

File "videotrans\task\dubbing.py", line 54, in dubbing

File "videotrans\task\dubbing.py", line 202, in _tts

File "videotrans\tts\__init__.py", line 184, in run

File "videotrans\tts\_base.py", line 145, in run

File "videotrans\tts\_base.py", line 215, 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\_ttsapi.py", line 42, 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 659, in send

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
TaskCfgTTS(uuid='9872a8098a', name='H:/PY/py-software/pyvideotrans/tmp/18252/20260609-221411.txt', dirname='H:/PY/py-software/pyvideotrans/tmp/18252', noextname='20260609-221411', basename='20260609-221411.txt', ext='txt', target_dir='H:/PY/py-software/pyvideotrans/output/tts', cache_folder='H:/PY/py-software/pyvideotrans/tmp/18252/9872a8098a', is_cuda=False, source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code='zh-cn', target_sub='H:/PY/py-software/pyvideotrans/tmp/18252/20260609-221411.txt', target_wav='H:/PY/py-software/pyvideotrans/output/tts/20260609-221411.wav', target_wav_output=None, tts_type=31, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='文艺女生', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=False)


=
system:Windows-10-10.0.19045-SP0
version:v4.01
frozen:True
language:zh
root_dir:H:/PY/py-software/pyvideotrans

1 Replies

错误核心原因:自定义 TTS API 服务端连接被拒绝或未正常运行,导致软件发送请求时远程端关闭连接(Remote end closed connection without response)。

请按以下步骤检查:

  1. 确认服务状态:检查自定义 TTS API 服务是否已启动且在监听。在浏览器中直接访问你填写的 URL(例如 http://127.0.0.1:5000),看是否能返回响应。
  2. 核对地址与端口:打开“菜单 → TTS 设置 → 自定义TTS API”,确保 URL 格式正确(如 http://127.0.0.1:8080/tts),端口号与服务端实际端口一致。
  3. 检查日志与错误:查看自定义 TTS API 服务端的控制台日志,通常会有更具体的连接被拒绝或请求格式不符的提示。
  4. API 密钥与认证:如果该 API 需要认证(如 Token),确认已在软件中正确填写。
  5. 角色名称匹配:日志显示使用了角色 '文艺女生',请确认自定义 API 端是否定义了该角色名,否则会返回错误。

如果以上步骤均无法解决,请提供自定义 TTS API 服务端的日志片段,以便进一步分析。

请查阅相关文档:

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: ko-fi.com/jianchang512

Related resource