#8896 翻译字幕阶段出错 [微软(免费)] ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))Traceback

183.198**9 Posted at: 9 hours ago

翻译字幕阶段出错 [微软(免费)] ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 488, in _make_request
File "urllib3\connectionpool.py", line 464, in _make_request
File "urllib3\connectionpool.py", line 1093, in _validate_conn
File "urllib3\connection.py", line 790, in connect
File "urllib3\connection.py", line 969, in _ssl_wrap_socket_and_match_hostname
File "urllib3\util\ssl_.py", line 480, in ssl_wrap_socket
File "urllib3\util\ssl_.py", line 524, in _ssl_wrap_socket_impl
File "ssl.py", line 513, in wrap_socket
File "ssl.py", line 1104, in _create
File "ssl.py", line 1375, in do_handshake
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

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 488, in _make_request
File "urllib3\connectionpool.py", line 464, in _make_request
File "urllib3\connectionpool.py", line 1093, in _validate_conn
File "urllib3\connection.py", line 790, in connect
File "urllib3\connection.py", line 969, in _ssl_wrap_socket_and_match_hostname
File "urllib3\util\ssl_.py", line 480, in ssl_wrap_socket
File "urllib3\util\ssl_.py", line 524, in _ssl_wrap_socket_impl
File "ssl.py", line 513, in wrap_socket
File "ssl.py", line 1104, in _create
File "ssl.py", line 1375, in do_handshake
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 114, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 79, in run
File "videotrans\translator\_base.py", line 117, in _run_text
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\translator\_microsoft.py", line 49, in _item_task
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.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

trk=翻译视频 单视频模式
选择音视频文件: C:/Users/zfp/Desktop/111.mp4,
输出目录: C:/Users/zfp/Desktop/_video_out/111-mp4,
self.cfg.cache_folder='D:/新建文件夹/tmp/24224/3772e40314'
已选 清理已生成, 未选 启用硬件加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 日语
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:微软(免费),发音语言:日语,目标语言:简体中文
传统翻译渠道每批字幕行数: 5
Dont dubbing: self.cfg.voice_role='No'
嵌入硬字幕
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
video duration:1663945ms
video information:{'video_fps': 25.0, 'r_frame_rate': 25.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1280, 'height': 720, 'time': 1663945, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='3772e40314', name='C:/Users/zfp/Desktop/111.mp4', dirname='C:/Users/zfp/Desktop', noextname='111', basename='111.mp4', ext='mp4', target_dir='C:/Users/zfp/Desktop/_video_out/111-mp4', cache_folder='D:/新建文件夹/tmp/24224/3772e40314', is_cuda=False, source_language='日语', source_language_code='ja', source_sub='C:/Users/zfp/Desktop/_video_out/111-mp4/ja.srt', source_wav='D:/新建文件夹/tmp/24224/3772e40314/ja.wav', source_wav_output='C:/Users/zfp/Desktop/_video_out/111-mp4/ja.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/zfp/Desktop/_video_out/111-mp4/zh-cn.srt', target_wav='D:/新建文件夹/tmp/24224/3772e40314/target.wav', target_wav_output='C:/Users/zfp/Desktop/_video_out/111-mp4/zh-cn.m4a', translate_type=1, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, tts_model_name=None, detect_language='ja', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='C:/Users/zfp/Desktop/_video_out/111-mp4/111.mp4', novoice_mp4='D:/新建文件夹/tmp/24224/3772e40314/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D:/新建文件夹/tmp/24224/3772e40314/instrument.wav', vocal='D:/新建文件夹/tmp/24224/3772e40314/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=1663945

1 Replies

#1 DeepSeek reply at 9 hours ago

这是底层的 TLS 握手被网络链路强制中断导致的连接级错误,并非软件逻辑 bug:ConnectionResetError 10054 发生在 ssl.py do_handshake 阶段,代表请求还没到达微软服务器、连接就被中途掐断了。常见诱因是代理/VPN 节点不稳定或未启动、填写了无效代理,以及微软免费接口对高频请求的临时阻断。

按以下顺序排查(多数情况下第 1、2 步即可解决):

  1. 检查主界面「网络代理」输入框。若里面填了 http://127.0.0.1:xxxx 之类地址,但代理软件未启动、端口不对或节点已断,所有请求都会在握手阶段被 reset。请先清空该框并保存,再重试;确实需要代理的,确认代理软件已运行且能正常访问外网。
  2. 切换网络 / 关闭再重开 VPN。若你在用 VPN 或公司网络,握手被 reset 多为链路拦截,换节点、换网络(如手机热点)重试一次即可验证。
  3. 确认版本不低于 v4.09。微软免费翻译接口地址有过变更,旧版会直接失败,建议升级到最新完整包/补丁包覆盖。
  4. 降低请求频率:菜单 → 工具/选项 → 高级选项 → 字幕翻译,把「传统翻译渠道每批字幕行数」改为 1,并把「翻译后暂停秒」设为 2~5,避免短时间密集请求被服务端掐断。
  5. 重试时取消勾选「清理已生成」。语音识别结果和已翻译部分都在缓存里,取消勾选可直接从翻译断点续跑,不必重新识别 27 分钟日语音频。
  6. 若反复失败,换渠道:

    • 免费备选:Google(免费)(国内需代理)、Hy-MT2(内置)、M2M100(内置)(首次使用自动下载模型);
    • 质量优先:DeepSeek 等 AI 渠道(日译中效果好、成本极低),选中「发送完整字幕」。
  7. 若换了渠道仍在同一阶段报 10054,请检查杀毒软件/防火墙是否在拦截 Python 进程的 TLS 连接,将该软件目录加入信任名单。

补充说明:本次日志显示你未启用配音(voice_role='No')、嵌入硬字幕,属于「只翻译字幕 + 嵌入硬字幕」流程,除翻译渠道外其余参数无异常。

请查阅相关文档:

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