#1884 requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9880): Max retries exceeded with url: /tt

23.165* Posted at: 20 hours ago 👁16

连接被拒绝,请确保本地服务已启动并正在运行:
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 1277, in endheaders
File "http\client.py", line 1037, in _send_output
File "http\client.py", line 975, 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?text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B.&text_lang=zh&ref_audio_path=1.wav&prompt_text=%E5%BE%88%E5%A4%9A%E8%80%81%E6%9D%BF%E8%BF%98%E4%B8%8D%E7%9F%A5%E9%81%93%E6%88%91%E4%BB%ACekong%E5%85%B7%E4%BD%93%E6%98%AF%E5%81%9A%E4%BB%80%E4%B9%88%E7%9A%84%EF%BC%8C%E6%88%91%E4%BB%ACekong%E7%9A%84%E6%8A%A4%E8%82%A4%E5%93%81%E7%A0%94%E5%8F%91%E5%92%8C%E7%94%9F%E4%BA%A7%E5%B7%B2%E7%BB%8F23%E5%B9%B4%E4%BA%86&prompt_lang=zh&speed_factor=1.0 (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\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 291, in run
File "videotrans\tts\_base.py", line 177, in run
File "videotrans\tts\_gptsovits.py", line 115, in _item_task
File "videotrans\tts\_gptsovits.py", line 92, in _run
File "requests\api.py", line 73, in get
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?text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B.&text_lang=zh&ref_audio_path=1.wav&prompt_text=%E5%BE%88%E5%A4%9A%E8%80%81%E6%9D%BF%E8%BF%98%E4%B8%8D%E7%9F%A5%E9%81%93%E6%88%91%E4%BB%ACekong%E5%85%B7%E4%BD%93%E6%98%AF%E5%81%9A%E4%BB%80%E4%B9%88%E7%9A%84%EF%BC%8C%E6%88%91%E4%BB%ACekong%E7%9A%84%E6%8A%A4%E8%82%A4%E5%93%81%E7%A0%94%E5%8F%91%E5%92%8C%E7%94%9F%E4%BA%A7%E5%B7%B2%E7%BB%8F23%E5%B9%B4%E4%BA%86&prompt_lang=zh&speed_factor=1.0 (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))


=
system:Windows-10-10.0.26100-SP0
version:v3.86
frozen:True
language:zh
root_dir:D:/pyvideo

1 Replies

错误显示软件无法连接到 127.0.0.1:9880,这是 GPT-SoVITS 语音克隆服务的默认地址。问题在于您选择了 GPT-SoVITS 进行配音,但本地并未启动该服务。

解决方案:

  1. 确认需求:您是否确实需要使用 GPT-SoVITS 进行语音克隆?如果不需要,请返回主界面,在“配音”设置中选择其他渠道,例如 Edge-TTS(免费)或 Azure TTS(需API Key)。
  2. 如需使用 GPT-SoVITS,必须按以下步骤启动服务

    • 下载并部署 GPT-SoVITS:您需要从 GitHub 上克隆或下载 GPT-SoVITS 项目(非 pyVideoTrans 的一部分),并按照其官方文档配置 Python 环境、安装依赖。
    • 启动推理 API 服务:在 GPT-SoVITS 项目目录下,运行其提供的启动脚本(通常命令类似 python api.py),确保服务成功监听在 127.0.0.1:9880 端口。
    • 在 pyVideoTrans 中配置:服务启动后,返回 pyVideoTrans,在“配音”设置中选择“GPT-SoVITS”,并确保右侧的“API地址”为 http://127.0.0.1:9880(默认值,通常无需修改)。

简单来说:GPT-SoVITS 是一个需要独立运行的外部服务,pyVideoTrans 只是一个调用它的客户端。您必须先把这个“服务器”运行起来。

如果您尚未部署 GPT-SoVITS 且只是想快速完成视频配音,建议切换回 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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions