#2551 Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8192, prompt_tokens

183.187* Posted at: 2 days ago 👁16

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8192, prompt_tokens=1551, total_tokens=9743, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=768), prompt_cache_hit_tokens=768, prompt_cache_miss_tokens=783)


=
system:Windows-10-10.0.19045-SP0
version:v3.90
frozen:True
language:zh
root_dir:D:/软件/配音

1 Replies

这个错误提示表明您在使用 OpenAI 的语音识别或翻译功能时,AI 模型的回复内容过长,超出了其单次处理的 Token 限制(8192个)。这通常发生在处理长音频或大量字幕时。

请按以下步骤解决:

  1. 调整语音识别模式

    • 在主界面第2行“语音识别”区域,将“识别模式”从“整体识别”切换为“批量推理”。
    • “批量推理”会将长音频按时间分割成多个小段分别处理,避免单次请求过长。
  2. 调整翻译批次

    • 如果错误发生在翻译阶段,请进入 菜单 -> 工具 -> 高级选项
    • 在“字幕翻译调整”区域,将“同时翻译字幕数”设置为一个较小的值,例如 510。这会将字幕分批发送给AI,避免单批内容过长。
  3. 优化断句设置

    • 如果使用了“LLM大模型重断句”,这也会消耗大量Token。对于长视频,可以暂时关闭此功能(选择“默认断句”或“本地算法重断句”),或确保在高级选项中“LLM重新断句每批字词数”设置得较小(如500)。
  4. 检查并清理缓存

    • 在主界面第1行,确保勾选了“清理已生成”选项,然后重新处理视频。这可以防止软件使用之前可能出错的缓存数据。

执行以上调整后,通常可以解决因内容过长导致的Token超限问题。如果问题依旧,请提供更完整的日志信息。

请查看更多参考文档:

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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions