#4847 TaskCfgVTT(uuid='c2816fef44', name='D:/yyy/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O.mp4', dirname='D:/yyy', noextname=

2408:8220* Posted at: 3 hours ago

语音识别阶段出错[faster-whisper(本地)] mkl_malloc: failed to allocate memory,Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 207, in faster_whisper
File "videotrans\process\stt_fun.py", line 172, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

Traceback (most recent call last):

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

File "videotrans\task\job.py", line 119, in process_task

File "videotrans\task\trans_create.py", line 320, in recogn

File "videotrans\recognition\__init__.py", line 190, in run

File "videotrans\recognition\_base.py", line 93, in run

File "videotrans\recognition\_whisper.py", line 35, in _exec

File "videotrans\recognition\_whisper.py", line 108, in _faster

File "videotrans\configure\base.py", line 252, in _new_process

videotrans.configure.excepts.VideoTransError: mkl_malloc: failed to allocate memory,Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 207, in faster_whisper
File "videotrans\process\stt_fun.py", line 172, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory
TaskCfgVTT(uuid='c2816fef44', name='D:/yyy/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O.mp4', dirname='D:/yyy', noextname='00-5v7g5j4YWeekly Webinar TRADING HUB 2.O', basename='00-5v7g5j4YWeekly Webinar TRADING HUB 2.O.mp4', ext='mp4', target_dir='D:/hhh/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O-mp4', cache_folder='D:/翻译/win-pyvideotrans-v4.00-528/tmp/11664/c2816fef44', is_cuda=True, source_language='英语', source_language_code='en', source_sub='D:/hhh/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O-mp4/en.srt', source_wav='D:/翻译/win-pyvideotrans-v4.00-528/tmp/11664/c2816fef44/en.wav', source_wav_output='D:/hhh/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='D:/hhh/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O-mp4/zh-cn.srt', target_wav='D:/翻译/win-pyvideotrans-v4.00-528/tmp/11664/c2816fef44/target.wav', target_wav_output='D:/hhh/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O-mp4/zh-cn.m4a', translate_type=0, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Xiaoxiao(Female/CN)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3-turbo', 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='D:/hhh/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O-mp4/00-5v7g5j4YWeekly Webinar TRADING HUB 2.O.mp4', novoice_mp4='D:/翻译/win-pyvideotrans-v4.00-528/tmp/11664/c2816fef44/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='D:/翻译/win-pyvideotrans-v4.00-528/tmp/11664/c2816fef44/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=True, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)


=
system:Windows-10-10.0.19045-SP0
version:v4.00
frozen:True
language:zh
root_dir:D:/翻译/win-pyvideotrans-v4.00-528

1 Replies

这是由于显存不足导致的。large-v3-turbo 模型(或你之前使用的 large-v3)需要至少 8GB 显存,但当前显卡可用显存不够,导致 MKL 内存分配失败。

解决方案:

  1. 使用更小的模型:在“语音识别”下拉框中将 large-v3-turbo 切换为 mediumsmallbase。这些模型对显存需求更低。
  2. 调整高级设置降低显存占用:点击菜单栏 工具/选项 -> 高级选项 -> 语音识别参数,进行以下修改:

    • CUDA数据类型:改为 float16int8(int8 最省显存)。
    • beam_size:从 5 改为 1。
    • best_of:从 5 改为 1。
    • 上下文感知:改为 false(不勾选)。
  3. 关闭其他占用显存的程序:如浏览器、游戏等,释放更多显存供软件使用。
  4. 检查 CUDA 环境:确保已正确安装 CUDA 12.8 和 cuDNN 9.x(若不匹配也可能导致显存分配异常),但当前错误主要由显存不足引起。

请查阅相关文档:

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.

Related resource