#8883 语音识别阶段出错[OpenRouter.ai] This request's maximum cost exceeds your available credits. Add credits.self.model_name='microso

142.91**0 Posted at: 6 hours ago

语音识别阶段出错[OpenRouter.ai] This request's maximum cost exceeds your available credits. Add credits.
self.model_name='microsoft/mai-transcribe-2'
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 84, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 148, in run
File "videotrans\recognition\_base.py", line 110, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\recognition\_openrouter.py", line 37, in _exec
videotrans.configure.excepts.SpeechToTextError: This request's maximum cost exceeds your available credits. Add credits.
self.model_name='microsoft/mai-transcribe-2'

trk=翻译视频 单视频模式
选择音视频文件: X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/2.2- Clarity.mp4,
输出目录: X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4,
self.cfg.cache_folder='D:/pyvideotrans4.18/tmp/2352/8a0beb334e'
未选 清理已生成, 未选 CUDA加速
已选 LLM纠错,LLM纠错每批字幕行数:50, LLM纠错所用AI渠道: OpenRouter
语音识别:OpenRouter.ai, microsoft/mai-transcribe-2, 发音语言: 英语
最长语音持续(秒): 10s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
翻译渠道:OpenRouter,发音语言:英语,目标语言:简体中文
已选 发送完整字幕, AI翻译渠道每批字幕行数:40
配音渠道:Edge-TTS(免费), 配音角色:Yunjian(Male/CN), 目标语言:简体中文
Volume:+0%, Speed:+0%, 未选 配音加速, 未选 视频慢速
未选 删字幕间静音, 已选 对齐字幕声音
已选 移除每条字幕配音开头结尾静音缓冲
静音移除力度: default
嵌入软字幕
video duration:1837752ms
video information:{'video_fps': 48.0, 'r_frame_rate': 48.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 1837752, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='8a0beb334e', name='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/2.2- Clarity.mp4', dirname='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity', noextname='2.2- Clarity', basename='2.2- Clarity.mp4', ext='mp4', target_dir='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4', cache_folder='D:/pyvideotrans4.18/tmp/2352/8a0beb334e', is_cuda=False, source_language='英语', source_language_code='en', source_sub='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4/en.srt', source_wav='D:/pyvideotrans4.18/tmp/2352/8a0beb334e/en.wav', source_wav_output='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4/zh-cn.srt', target_wav='D:/pyvideotrans4.18/tmp/2352/8a0beb334e/target.wav', target_wav_output='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4/zh-cn.m4a', translate_type=10, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Yunjian(Male/CN)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=31, model_name='microsoft/mai-transcribe-2', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=True, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/2 - Clarity/_video_out/2.2- Clarity-mp4/2.2- Clarity.mp4', novoice_mp4='D:/pyvideotrans4.18/tmp/2352/8a0beb334e/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D:/pyvideotrans4.18/tmp/2352/8a0beb334e/instrument.wav', vocal='D:/pyvideotrans4.18/tmp/2352/8a0beb334e/vocal.wav', clear_cache=False, background_music='', subtitle_type=2, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=1837752


=
system:Windows-10-10.0.19045-SP0
version:v4.18
frozen:True
language:zh_CN
root_dir:D:/pyvideotrans4.18

1 Replies

#1 DeepSeek reply at 6 hours ago

核心原因:这不是软件 bug,是 OpenRouter.ai 账户余额不足。报错 This request's maximum cost exceeds your available credits. Add credits. 表示 OpenRouter 预估本次请求的最高花费超过了账户可用额度(credit)。

解决方案(任选其一)

  1. 充值 OpenRouter 账户

    • 登录 https://openrouter.ai,在 Credits 页面充值,确保余额大于该模型单次请求的预估上限(microsoft/mai-transcribe-2 处理长音频时预估费用较高,1837 秒的视频建议留足余额)。
  2. 换用本地免费识别渠道(推荐)

    • 主界面 语音识别 改为 faster-whisper(内置),模型选 large-v3-turbo 或 large-v3,无需任何费用和网络。
    • 有 N 卡则可同时勾选 CUDA加速 提速。
  3. 降低单次请求成本

    • 若必须用 OpenRouter,建议把长视频切分为较短的音频再识别,或换用更便宜的识别模型(如 openai/whisper-large-v3 等),以降低单次的预估最大花费。
  4. 注意:你的 LLM 纠错渠道也是 OpenRouter(LLM纠错所用AI渠道: OpenRouter)

    • 余额不足会导致该阶段同样报错。请在 菜单 → 翻译设置 → OpenRouter 中确认 Key 与余额,或在 高级选项 → 语音识别参数 → LLM纠错所用 AI 渠道 改为 DeepSeek 等其他渠道,或直接取消勾选 LLM纠错。
另提示:当前视频路径 X:/BaiduNetdiskDownload/A.Course/9、Conquering the tower of Polish 抛光动画/... 含中文和空格,虽不一定导致此错,但后续 FFmpeg 阶段有概率出现路径解析问题,建议将视频移动到浅层纯英文目录并重命名为简短名称(如 D:/videos/2-2.mp4)后再处理。

请查阅相关文档:

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