#5028 TaskCfgVTT(uuid='fde1248bed', name='G:/视频/wenjian/大师/姿势的精神/1周总概/3/Figure Drawing_ The Spirit of the Pose _ Part 1_ Intro

120.199* Posted at: 7 hours ago

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=1352, prompt_tokens=2744, total_tokens=4096, completion_tokens_details=None, prompt_tokens_details=None)语音识别阶段出错:阿里FunASR(本地), 翻译字幕阶段出错: 兼容AI/本地模型, 配音阶段出错:Edge-TTS(免费)
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 68, in run
File "videotrans\task\trans_create.py", line 585, in trans
File "videotrans\translator\__init__.py", line 858, in run
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 142, in _run_srt
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\_openaicompat.py", line 84, in _item_task
openai.LengthFinishReasonError: Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=1352, prompt_tokens=2744, total_tokens=4096, completion_tokens_details=None, prompt_tokens_details=None)
TaskCfgVTT(uuid='fde1248bed', name='G:/视频/wenjian/大师/姿势的精神/1周总概/3/Figure Drawing_ The Spirit of the Pose Part 1 Intro and Theory New Masters Academy.mp4', dirname='G:/视频/wenjian/大师/姿势的精神/1周总概/3', noextname='Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy', basename='Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy.mp4', ext='mp4', target_dir='G:/视频/wenjian/大师/姿势的精神/1周总概/3/_video_out/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy-mp4', cache_folder='D:/shipingongju/vido/tmp/22700/fde1248bed', is_cuda=True, source_language='英语', source_language_code='en', source_sub='G:/视频/wenjian/大师/姿势的精神/1周总概/3/_video_out/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy-mp4/en.srt', source_wav='D:/shipingongju/vido/tmp/22700/fde1248bed/en.wav', source_wav_output='G:/视频/wenjian/大师/姿势的精神/1周总概/3/_video_out/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='G:/视频/wenjian/大师/姿势的精神/1周总概/3/_video_out/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy-mp4/zh-cn.srt', target_wav='D:/shipingongju/vido/tmp/22700/fde1248bed/target.wav', target_wav_output='G:/视频/wenjian/大师/姿势的精神/1周总概/3/_video_out/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy-mp4/zh-cn.m4a', translate_type=8, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Yunyang(Male/CN)', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=3, model_name='Fun-ASR-Nano-2512', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='G:/视频/wenjian/大师/姿势的精神/1周总概/3/_video_out/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory New Masters Academy-mp4/Figure Drawing The Spirit of the Pose Part 1 Intro and Theory _ New Masters Academy.mp4', novoice_mp4='D:/shipingongju/vido/tmp/22700/fde1248bed/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='D:/shipingongju/vido/tmp/22700/fde1248bed/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)


=
system:Windows-10-10.0.26200-SP0
version:v4.01
frozen:True
language:zh
root_dir:D:/shipingongju/vido

1 Replies

翻译阶段失败的根本原因:AI大模型的最大输出长度限制(max token)不足,导致响应被截断无法解析。

解决方案:

  1. 增大 max token 值

    • 在菜单 翻译设置兼容AI/本地模型(或您正在使用的 AI 翻译渠道)设置界面中,找到 max token 选项,将其值调大(例如从 4096 调整为 8192 或更高,确保不小于输入字幕的总 token 数)。
  2. 降低单次发送字幕量

    • 菜单 → 工具/选项 → 高级选项 → 字幕翻译调整 中,将 AI翻译渠道每批字幕行数 适当减小(如从 20 降至 10),减少每次请求的数据量。
  3. 关闭“发送完整字幕”或“一次性翻译所有字幕”

    • 若您勾选了主界面的 发送完整字幕,或启用了高级选项中的 AI翻译一次性翻译所有字幕行,请取消它们,改为分批次翻译。这样可以避免单次请求超过大模型上下文限制。
  4. 确认模型支持长上下文

    • 如果使用本地部署的模型(如 7B 以下的小模型),其上下文窗口通常较小,建议改用 DeepSeek、GPT-4 等支持更长上下文的在线模型。

注意:错误日志中未显示语音识别(FunASR)和配音(Edge-TTS)的报错,它们可能因翻译中断而未被执行。若翻译修复后其他阶段仍报错,请提供对应阶段的完整日志。

请查阅相关文档:

Post Your Reply
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: ko-fi.com/jianchang512

Related resource