#5617 语音识别阶段出错[openai-whisper(本地内置)] :Traceback (most recent call last): File "urllib\request.py", line 1348, in do_open Fil

183.195* Posted at: 1 hour ago

语音识别阶段出错[openai-whisper(本地内置)] :Traceback (most recent call last):
File "urllib\request.py", line 1348, in do_open
File "http\client.py", line 1283, in request
File "http\client.py", line 1329, in _send_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 "http\client.py", line 1455, in connect
File "ssl.py", line 513, in wrap_socket
File "ssl.py", line 1104, in _create
File "ssl.py", line 1375, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'openaipublic.azureedge.net'. (_ssl.c:1017)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 51, in openai_whisper
File "whisper\__init__.py", line 137, in load_model
File "whisper\__init__.py", line 73, in _download
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:

Traceback (most recent call last):

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

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

File "videotrans\task\trans_create.py", line 319, in recogn

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

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

File "videotrans\recognition\_whisper.py", line 36, in _exec

File "videotrans\recognition\_whisper.py", line 85, in _openai

File "videotrans\configure\base.py", line 272, in _new_process

videotrans.configure.excepts.VideoTransError: :Traceback (most recent call last):
File "urllib\request.py", line 1348, in do_open
File "http\client.py", line 1283, in request
File "http\client.py", line 1329, in _send_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 "http\client.py", line 1455, in connect
File "ssl.py", line 513, in wrap_socket
File "ssl.py", line 1104, in _create
File "ssl.py", line 1375, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'openaipublic.azureedge.net'. (_ssl.c:1017)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 51, in openai_whisper
File "whisper\__init__.py", line 137, in load_model
File "whisper\__init__.py", line 73, in _download
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:
cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 批量翻译模式
原始输入文件名: C:/Users/berry/Desktop/YOUTUBE下载/Battleships and How Anime Does Them Right.webm,
输出结果保存到文件夹: C:/Users/berry/Desktop/YOUTUBE下载/新建文件夹/Battleships and How Anime Does Them Right-webm,
临时文件夹: D:/0_tools/win-pyvideotrans-v4.03-0626/tmp/26532/2b610461e6
已选 清理已存在
已选 启用CUDA加速
未选 降噪
语音识别:openai-whisper(本地内置), model_name: medium.en, 发音语言: 英语, 断句方式:LLM重新断句
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunxi(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 未选 音频加速, 已选 视频慢速
字幕: 嵌入硬字幕
已选 仅输出mp4
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/0_tools/win-pyvideotrans-v4.03-0626

1 Replies

这是由于 openai-whisper 尝试从 openaipublic.azureedge.net 在线下载模型时,SSL 证书验证失败导致的模型下载中断。常见原因包括:系统时间不正确、网络防火墙或代理干扰中国大陆访问该域名、系统证书过旧。

解决方案:

  1. 检查系统时间:确保电脑的日期和时间设置正确(尤其年份和时区),时间错误会导致 SSL 证书验证失效。
  2. 暂时关闭代理或 VPN:如果开启了代理,请关闭后重试;若在国内须使用代理才能访问国外站点,请确保代理设置正确(主界面的代理文本框填写 http://127.0.0.1:你的端口号)。
  3. 手动下载模型文件(推荐,可根治该问题)

    • 根据模型名称 medium.en,前往 openai-whisper 的 HuggingFace 仓库 或官方 GitHub 发布页面,下载 medium.en.pt 文件。
    • 将该文件放入软件根目录下的 models/ 文件夹内(如 D:/0_tools/win-pyvideotrans-v4.03-0626/models/medium.en.pt)。
    • 之后软件将直接读取本地模型,不再尝试在线下载。
  4. 切换为 faster-whisper 渠道:如果您是 NVIDIA 显卡并配置了 CUDA,建议改用 faster-whisper(本地内置) 渠道并选择 large-v3 模型。该渠道对国内网络更友好,模型下载失败时也支持手动下载模型(参见知识库第14节)。

如果手动下载后问题依旧,请提供软件安装目录下 logs/ 文件中最新的 30 行日志内容,以便进一步排查。

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