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

2401**9 Posted at: 11 hours ago

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

File "urllib3\connectionpool.py", line 773, in urlopen

File "urllib3\connectionpool.py", line 1042, in _prepare_proxy

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 773, in urlopen

File "urllib3\connectionpool.py", line 1042, in _prepare_proxy

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\job.py", line 35, in run

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

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/33295/Desktop/半导体制造101 课程音视频/02 半导体电子学/02 半导体电子学.mp4,
输出目录: C:/Users/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4,
self.cfg.cache_folder='C:/应用/翻译/tmp/25464/ec3fe191ac'
已选 清理已生成, 未选 启用硬件加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:Google(免费),发音语言:英语,目标语言:简体中文
传统翻译渠道每批字幕行数: 5
Dont dubbing: self.cfg.voice_role='No'
嵌入硬字幕
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
video duration:1558600ms
video information:{'video_fps': 25.0, 'r_frame_rate': 25.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 1558600, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='ec3fe191ac', name='C:/Users/33295/Desktop/半导体制造101 课程音视频/02 半导体电子学/02 半导体电子学.mp4', dirname='C:/Users/33295/Desktop/半导体制造101 课程音视频/02 半导体电子学', noextname='02 半导体电子学', basename='02 半导体电子学.mp4', ext='mp4', target_dir='C:/Users/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4', cache_folder='C:/应用/翻译/tmp/25464/ec3fe191ac', is_cuda=False, source_language='英语', source_language_code='en', source_sub='C:/Users/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4/en.srt', source_wav='C:/应用/翻译/tmp/25464/ec3fe191ac/en.wav', source_wav_output='C:/Users/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4/zh-cn.srt', target_wav='C:/应用/翻译/tmp/25464/ec3fe191ac/target.wav', target_wav_output='C:/Users/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4/zh-cn.m4a', translate_type=0, 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='en', 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/33295/Desktop/_video_out/半导体制造101 课程音视频/02 半导体电子学-mp4/02 半导体电子学.mp4', novoice_mp4='C:/应用/翻译/tmp/25464/ec3fe191ac/novoice.mp4', is_separate=False, embed_bgm=True, instrument='C:/应用/翻译/tmp/25464/ec3fe191ac/instrument.wav', vocal='C:/应用/翻译/tmp/25464/ec3fe191ac/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=True)


=
system:Windows-10-10.0.26200-SP0
version:v4.19
frozen:True
language:zh_CN
root_dir:C:/应用/翻译

1 Replies

#1 DeepSeek reply at 11 hours ago

这是网络连接被中断导致的(ConnectionResetError 10054 表示远程主机强制关闭连接)。从堆栈中的 _prepare_proxy 可看出请求经过了网络代理,随即在 TLS 握手阶段被切断;且日志显示 Google 失败后程序自动回退到 _microsoft.py(微软免费翻译)仍然连接失败,说明当前代理或外网通道整体不通,而非软件 bug。

按以下顺序处理:

  1. 确认代理状态:主界面「同步对齐」行右侧的网络代理文本框,若填了地址(如 http://127.0.0.1:7890),必须确保代理软件正在运行且端口一致;若没有可用代理,请清空该文本框并保存,否则所有外网请求都会失败。
  2. 换用无需代理的免费渠道:翻译渠道下拉选择 Microsoft(免费),国内可直连,无需科学上网(偶尔限流,稍后重试即可)。
  3. 推荐改用 DeepSeek(质量最佳且稳定):到 platform.deepseek.com 注册充值(可只充 1 元)获取 API Key,填入 菜单 → 翻译设置 → DeepSeek,翻译渠道选 DeepSeek,并勾选 发送完整字幕。AI 渠道对小语种和长句质量明显优于免费接口。
  4. 完全离线方案:翻译渠道选 M2M100(内置),首次使用会在线下载模型(约 12B 参数,位于 软件目录/models/m2m100_12b),下载成功后即可断网翻译。
  5. 重试前务必勾选 清理已生成,避免复用上次失败的中间结果。

补充说明:若坚持用 Google(免费),需保证代理节点干净稳定(被 Google 标记的节点会返回 429 或直接被重置),频繁请求也会触发断连;可在 高级选项 → 字幕翻译 → 翻译后暂停秒 增加间隔,并把 传统翻译渠道每批字幕行数 调小。

另请注意:你的视频路径含中文和空格(C:/Users/33295/Desktop/半导体制造101 课程音视频/...),这一步虽不影响翻译,但后续 FFmpeg 合成阶段易因路径/文件名字符问题报错,建议顺手把视频改名为简短英文数字名称并放到浅层目录。

请查阅相关文档:

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