#8482 翻译字幕阶段出错 [DeepSeek] 无返回翻译结果self=[DeepSeek]: uuid='4957b10d2c', proxy_str='http://127.0.0.1:10809', translate_type=5, is_

144.31**3 Posted at: 1 hour ago

翻译字幕阶段出错 [DeepSeek] 无返回翻译结果
self=[DeepSeek]: uuid='4957b10d2c', proxy_str='http://127.0.0.1:10809', translate_type=5, is_test=False, source_code='English', target_code='Simplified Chinese', common_target_code='zh-cn', api_url='https://api.deepseek.com/v1/', model_name='deepseek-flash', trans_thread=40, wait_sec=0.0, local_dir=None, is_cuda=True, aisendsrt=True, ainame='deepseek', temperature=0.1, max_tokens=16384, reasoning_effort=None, extra_body=None
Traceback (most recent call last):

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

File "videotrans\task\job.py", line 136, 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 82, in run

File "videotrans\translator\_base.py", line 167, in _run_srt

videotrans.configure.excepts.TranslateSrtError: 无返回翻译结果
self=[DeepSeek]: uuid='4957b10d2c', proxy_str='http://127.0.0.1:10809', translate_type=5, is_test=False, source_code='English', target_code='Simplified Chinese', common_target_code='zh-cn', api_url='https://api.deepseek.com/v1/', model_name='deepseek-flash', trans_thread=40, wait_sec=0.0, local_dir=None, is_cuda=True, aisendsrt=True, ainame='deepseek', temperature=0.1, max_tokens=16384, reasoning_effort=None, extra_body=None
trk=[TransCreate]: uuid='4957b10d2c', proxy_str='http://127.0.0.1:10809', cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: H:/第三学期/专业机器学习技术/AdvancedML Lecture (Лек) 2.mp4,
输出结果保存到文件夹: H:/第三学期/专业机器学习技术/_video_out/AdvancedML Lecture (Лек) 2-mp4,
临时文件夹: H:/win-pyvideotrans-v4.17/tmp/4024/4957b10d2c
已选 清理已存在
已启用CUDA加速
语音识别:faster-whisper(内置), large-v1, 发音语言: 英语, LLM纠错, 数据类型:default
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕, settings.get('trans_thread')=5, settings.get('aitrans_thread')=40
输出字幕格式: 单字幕
代理地址: http://127.0.0.1:10809, precent=12, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=False, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=False


=
system:Windows-10-10.0.26200-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:H:/win-pyvideotrans-v4.17

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因是单次提交给 DeepSeek 的字幕行数过多(当前 aitrans_thread=40),在 max_tokens=16384 的输出上限下,模型返回被截断或返回为空,导致 _run_srt 判定“无返回翻译结果”。

处理步骤:

  1. 打开 菜单 → 工具/选项 → 高级选项 → 字幕翻译调整,将 AI翻译渠道每批字幕行数 由 40 改为 10~20,保存。
  2. 同时把 DeepSeek 渠道设置里的 最大输出 token(max_tokens) 调大(如 32768,前提是模型支持)。
  3. 排查原始字幕是否有异常:若某行字幕包含大量重复词(如 "no no no no…"、"hey hey hey…"),模型会陷入死循环直到耗尽 token,表现为无返回。请打开本次生成的字幕文件(H:/win-pyvideotrans-v4.17/tmp/4024/4957b10d2c 内的原始语言 srt,或输出文件夹内 en.srt),检查并删减这些重复行后重试。
  4. 重试前勾选主界面 清理已生成,避免复用上次失败的缓存(tmp/translate_cache/)。
  5. 可临时取消勾选 发送完整字幕,改为逐行文本模式发送,能显著降低单次 token 压力(翻译质量略降)。
  6. 代理提示:DeepSeek 为国内 API,本就不走代理,当前 proxy_str=http://127.0.0.1:10809 不影响该渠道;但若代理节点不稳定导致整体网络超时,也可尝试清空代理框再测试。

若按上述调整后仍报同样错误,请提供 logs/ 目录下当日日志文件底部约 30 行内容(含 DeepSeek 原始返回或 HTTP 状态码)。

请查阅相关文档:

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