#8241 Traceback (most recent call last): File

141.11**3 Posted at: 1 hour ago

Traceback (most recent call last):
File "videotrans\recognition\_base.py", line 101, in run
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 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 141, in run
File "videotrans\recognition\_base.py", line 110, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\recognition\_google.py", line 58, in _exec
File "speech_recognition\__init__.py", line 710, in recognize_google
speech_recognition.exceptions.RequestError: recognition request failed: Bad Gateway

trk=[TransCreate]: uuid='54ea0fa048', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/Administrator/Desktop/86 IndexTTS2.5/MASE-061.mp4,
输出结果保存到文件夹: C:/Users/Administrator/Desktop/86 IndexTTS2.5/_video_out/MASE-061-mp4,
临时文件夹: C:/Users/Administrator/Desktop/win-pyvideotrans-v4.16/tmp/37564/54ea0fa048
已选 清理已存在
未启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量3
语音识别:Google识别API(免费), , 发音语言: 日语,
翻译渠道:DeepSeek,原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Index-TTS(本地API), 角色:clone, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
已选 仅输出mp4
代理地址: http://127.0.0.1:7897, precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='C:/Users/Administrator/Desktop/win-pyvideotrans-v4.16/tmp/37564/54ea0fa048/vocal.wav', should_recogn2=False, do_diarize=True
video_duration_ms=4345300


=
system:Windows-10-10.0.26100-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:C:/Users/Administrator/Desktop/win-pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 1 hour ago

问题出在 语音识别(ASR) 渠道选用了 Google识别API(免费)(speech_recognition 库调用 Google Web Speech 接口)。该渠道不是官方 API,没有任何服务保障,必须依赖代理链路直连 Google 服务器;当前代理 http://127.0.0.1:7897 返回了 Bad Gateway(502),说明代理节点被 Google 拒绝或链路已断,请求重试多次后仍失败。此外,该免费接口还存在严格频率限制,对 43 分钟长音频(video_duration_ms=4345300)几乎必然中断失败。

解决方案

方案一(推荐):改用本地内置识别渠道,彻底绕开网络问题

日语视频在 pyVideoTrans 中推荐以下本地渠道,首次使用会自动下载模型:

  1. 主界面 语音识别 下拉选择 faster-whisper(内置),模型选 large-v3-turbo(速度与质量兼顾,显存约 6GB)或 large-v3
  2. 或选择 openai-whisper(内置) + large-v3(日语通用效果更好)
  3. 或选择 Nemotron-3.5-asr-0.6b(内置)(英伟达开源多语言模型,明确支持日语,体积小、速度快)
  4. 发音语言 保持 日语 不变,其余参数(DeepSeek 翻译、Index-TTS clone 配音、分离人声背景声等)无需改动
  5. 勾选 清理已生成 后重新执行
若本地模型下载失败,请参考手动下载地址:软件目录/models/models--Systran--faster-whisper-large-v3-turbo

方案二:仍用在线 API,但换成有保障的付费渠道

  • OpenAI 语音识别API(日语效果优秀)
  • Gemini AI(需科学上网,小语种能力强)
  • Deepgram.com(需注册 API Key)

方案三:若坚持使用 Google 免费识别

  1. 确认代理节点可用:curl -x http://127.0.0.1:7897 https://www.google.com 能正常返回
  2. 更换更干净的 VPN 节点(被标记的 IP 会被 Google 直接 502/429)
  3. 长视频建议先用其他工具切分成 5~10 分钟的小段分别处理

补充提醒

你同时勾选了 识别说话人(最大 3 人)。切换到本地渠道后该功能可正常使用;但要注意 clone 音色克隆要求参考音频在 3~10 秒,请确认 高级选项 → 语音识别参数 中 最短语音持续 ≥ 3000 毫秒、最长语音持续 6~10 秒,否则克隆配音容易失真或报错。

请查阅相关文档:

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