#2056 TaskCfg(cache_folder=None, target_dir='E:/观察', remove_noise=False, is_separate=False, detect_language=None, subtitle_lan

219.134* Posted at: 10 hours ago 👁13

翻译字幕阶段出错:[DeepSeek] 运行时错误:[DeepSeek] content_filter:ChatCompletion(id='ff04056c-3a6a-4e6f-9b87-1a5015111f99', choices=[Choice(finish_reason='content_filter', index=0, logprobs=None, message=ChatCompletionMessage(content='', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=None))], created=1765823360, model='deepseek-chat', object='chat.completion', service_tier=None, system_fingerprint='fp_eaab8d114b_prod0820_fp8_kvcache', usage=CompletionUsage(completion_tokens=0, prompt_tokens=4306, total_tokens=4306, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=4288), prompt_cache_hit_tokens=4288, prompt_cache_miss_tokens=18)):
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, 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 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 184, in run
File "videotrans\task\_translate_srt.py", line 45, in trans
File "videotrans\translator\__init__.py", line 923, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_deepseek.py", line 72, in _item_task
RuntimeError: [DeepSeek] content_filter:ChatCompletion(id='ff04056c-3a6a-4e6f-9b87-1a5015111f99', choices=[Choice(finish_reason='content_filter', index=0, logprobs=None, message=ChatCompletionMessage(content='', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=None))], created=1765823360, model='deepseek-chat', object='chat.completion', service_tier=None, system_fingerprint='fp_eaab8d114b_prod0820_fp8_kvcache', usage=CompletionUsage(completion_tokens=0, prompt_tokens=4306, total_tokens=4306, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=4288), prompt_cache_hit_tokens=4288, prompt_cache_miss_tokens=18))

TaskCfg(cache_folder=None, target_dir='E:/观察', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code='English', target_language_code='Simplified Chinese', source_sub='E:/观察/Bloomberg Surveillance 12_15_2025 EN.srt', target_sub='E:/观察/Bloomberg Surveillance 12_15_2025 EN.Simplified Chinese.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='Bloomberg Surveillance 12_15_2025 EN', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=4, tts_type=None, recogn_type=None, model_name=None, split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='E:/观察/Bloomberg Surveillance 12_15_2025 EN.srt', basename='Bloomberg Surveillance 12_15_2025 EN.srt', ext='srt', dirname='E:/观察', shound_del_name=None, uuid='2d1fb50eae', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.90
frozen:True
language:zh
root_dir:B:/win-videotrans

1 Replies

错误信息显示 DeepSeek 翻译时触发了 content_filter(内容过滤),导致翻译失败。这通常是因为字幕内容被 DeepSeek 的安全策略判定为敏感或不适宜。

解决方案:

  1. 检查字幕内容:打开你的字幕文件 E:/观察/Bloomberg Surveillance 12_15_2025 EN.srt,检查其中是否包含可能被误判为敏感的政治、金融或争议性词汇。特别是财经新闻类内容可能触发过滤。
  2. 分批翻译:在软件中,进入 工具/选项 -> 高级选项,在“字幕翻译调整”区域,将“同时翻译字幕数”设置为一个较小的值(例如 510),并勾选“发送完整字幕”。这可以降低单次请求的内容复杂度,可能绕过过滤。
  3. 更换翻译渠道:如果分批后仍然失败,建议暂时更换其他翻译渠道。例如:

    • 免费渠道:Google 翻译(需配置网络代理)。
    • 其他AI模型:尝试 OpenAI (ChatGPT)、Gemini 或 Claude(需在“翻译设置”中配置相应的 API Key)。
  4. 手动处理敏感片段:如果怀疑是特定片段导致,可以先用文本编辑器打开 SRT 文件,将疑似敏感的词句进行模糊化处理(例如用拼音或缩写替代),翻译完成后再改回。

如果以上方法均无效,请提供 B:/win-videotrans/logs/ 目录下的最新日志文件,以便进一步分析。

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