#7418 语音识别阶段出错[Gemini大模型识别] Network connection failedTraceback (most recent call last):

240e**fd0 Posted at: 1 hour ago

语音识别阶段出错[Gemini大模型识别] Network connection failed
Traceback (most recent call last):

File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions

File "httpx\_transports\default.py", line 250, in handle_request

File "httpcore\_sync\connection_pool.py", line 216, in handle_request

File "httpcore\_sync\connection_pool.py", line 196, in handle_request

File "httpcore\_sync\http_proxy.py", line 317, in handle_request

File "httpcore\_sync\http11.py", line 383, in start_tls

File "httpcore\_backends\sync.py", line 152, in start_tls

File "contextlib.py", line 153, in exit

File "httpcore\_exceptions.py", line 14, in map_exceptions

httpcore.ConnectError: EOF occurred in violation of protocol (_ssl.c:1017)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

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

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

......
self._retry(self._request_once, http_request, stream) # type: ignore[no-any-return]

File "tenacity\__init__.py", line 477, in call

File "tenacity\__init__.py", line 378, in iter

File "tenacity\__init__.py", line 420, in exc_check

File "tenacity\__init__.py", line 187, in reraise

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 "google\genai\_api_client.py", line 1513, in _request_once

response = self._httpx_client.send(httpx_request, stream=stream)  # type: ignore[union-attr, arg-type]

File "httpx\_client.py", line 914, in send

File "httpx\_client.py", line 942, in _send_handling_auth

File "httpx\_client.py", line 979, in _send_handling_redirects

File "httpx\_client.py", line 1014, in _send_single_request

File "httpx\_transports\default.py", line 249, in handle_request

File "contextlib.py", line 153, in exit

File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions

httpx.ConnectError: EOF occurred in violation of protocol (_ssl.c:1017)

self.cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: C:/Users/Administrator/Downloads/sAX7aSNwq2d1aLXX.mp4,
输出结果保存到文件夹: C:/Users/Administrator/Downloads/_video_out/sAX7aSNwq2d1aLXX-mp4,
临时文件夹: E:/常用软件/py412/tmp/4088/96b69db02a
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:Gemini大模型识别, , 发音语言: 英语, 断句方式:默认断句
翻译渠道:Gemini AI,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
输出字幕格式: 单字幕
代理地址:http://127.0.0.1:22307


=
system:Windows-10-10.0.26200-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:E:/常用软件/py412

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因是 Gemini 语音识别渠道的网络连接被代理阻断。报错 httpcore.ConnectError: EOF occurred in violation of protocol 表明 HTTPS 握手在通过你填写的代理 http://127.0.0.1:22307 时失败(代理未运行、端口错误、协议不匹配或代理服务不稳定)。

解决方案(按顺序尝试):

  1. 确认代理服务状态:打开你的代理软件,确认 127.0.0.1:22307 这个 HTTP 代理端口确实在监听。可在浏览器中访问 Google 验证代理是否可用。
  2. 代理格式校验:软件主界面对齐控制行右侧的代理文本框,格式必须为 http://127.0.0.1:22307socks5://127.0.0.1:22307(根据你代理软件实际提供的协议类型填写,两者不可混用)。
  3. 切换代理节点:Gemini 需要能稳定访问 Google 的网络环境。当前节点可能被阻断或 TLS 被干扰,更换更干净的节点后重试。
  4. 关闭代理直连测试:若你有系统级全局代理,可尝试清空软件内代理文本框后重试(需确保系统代理本身能让 Gemini 通联)。
  5. 降低 Gemini 并发:进入 菜单 → 工具 → 高级选项 → 语音识别参数,将 Gemini语音识别每批切片数 调小(如 1),减少单次上传体积,降低超时/中断概率。
  6. 备选方案:若代理始终不稳定,可改用本地 faster-whisper(内置) 进行语音识别(英语识别效果优秀且无需联网),Gemini 仅保留用于字幕翻译。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource