#841 urllib.error.URLError: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>

*199.255* Posted at: 4 hours ago 👁4

语音识别阶段出错:[openai-whisper(本地)] 系统错误 (None):None:

Traceback (most recent call last):

File "urllib\request.py", line 1348, in do_open

File "http\client.py", line 1282, in request

File "http\client.py", line 1328, in _send_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 "http\client.py", line 1447, in connect

File "http\client.py", line 941, in connect

File "socket.py", line 845, in create_connection

File "socket.py", line 833, in create_connection

ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

File "videotrans\task\_speech2text.py", line 91, in recogn

File "videotrans\recognition\__init__.py", line 178, in run

File "videotrans\recognition\_base.py", line 78, in run

File "videotrans\recognition\_openai.py", line 46, in _exec

File "whisper\__init__.py", line 137, in load_model

checkpoint_file = _download(_MODELS[name], download_root, in_memory)

File "whisper\__init__.py", line 73, in _download

with urllib.request.urlopen(url) as source, open(download_target, "wb") as output:

File "urllib\request.py", line 216, in urlopen

File "urllib\request.py", line 519, in open

File "urllib\request.py", line 536, in _open

File "urllib\request.py", line 496, in _call_chain

File "urllib\request.py", line 1391, in https_open

File "urllib\request.py", line 1351, in do_open

urllib.error.URLError:

=====

Windows-10-10.0.19045-SP0

version:v3.81

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个错误是由于在使用 openai-whisper(本地) 进行语音识别时,软件无法连接到模型下载服务器导致的。具体表现为"由于目标计算机积极拒绝,无法连接",这通常是因为网络连接问题。

问题分析:

  • 您使用的是 openai-whisper 本地模式,该模式需要从 huggingface.co 下载模型文件
  • 错误显示软件尝试下载模型时连接被拒绝
  • 这可能是由于网络防火墙、代理设置或国内访问 huggingface.co 不稳定造成的

解决方案:

方法一:使用 faster-whisper 替代(推荐)

1. 在语音识别设置中,将识别渠道从 "openai-whisper(本地)" 切换为 "faster-whisper(本地)"

2. faster-whisper 默认使用国内镜像站下载,成功率更高

方法二:配置网络代理(如果使用科学上网)

1. 在软件的网络代理设置中填写您的代理地址和端口(格式:地址:端口)

2. 在软件目录下创建 huggingface.lock 文件(注意后缀是 .lock,不是 .txt

3. 这样软件会直接从 huggingface.co 官网下载,速度更快更稳定

方法三:使用专用下载工具

1. 访问 https://pyvideotrans.com/faster-whisper-download

2. 下载对应的模型下载工具

3. 将下载工具放在软件目录下运行,它会自动下载所需模型

方法四:手动下载模型

1. 前往 https://github.com/jianchang512/stt/releases/tag/0.0

2. 下载您需要的 whisper 模型压缩包

3. 解压到软件的 models 文件夹中

建议优先尝试方法一,切换到 faster-whisper 渠道,这通常能解决大部分下载问题。如果问题仍然存在,可以查看软件目录下 logs 文件夹中的日志文件获取更详细的错误信息。

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

Trending Questions