#6899 语音识别阶段出错[faster-whisper(内置)] mkl_malloc: failed to allocate memory,Traceback (most recent call last): File

2408:**:79ca Posted at: 1 hour ago

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 50, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 86, in faster_whisper
File "videotrans\process\stt_faster.py", line 70, in _create_model
File "videotrans\process\stt_faster.py", line 74, in _create_model
File "videotrans\process\stt_faster.py", line 50, in _create_model
File "faster_whisper\trans
......
", line 130, in _faster

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

videotrans.configure.excepts.VideoTransError: mkl_malloc: failed to allocate memory,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 50, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 50, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 86, in faster_whisper
File "videotrans\process\stt_faster.py", line 70, in _create_model
File "videotrans\process\stt_faster.py", line 74, in _create_model
File "videotrans\process\stt_faster.py", line 50, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory
[TransCreate]翻译视频: self.is_copy_video=True,self.video_codec_num=264,self.is_audio_trans=False,self.video_info={'video_fps': 24.0, 'r_frame_rate': 24.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 281791, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: C:/Users/DELL/Desktop/1/沼泽之铁-北境暗黑民谣.mp4,
输出结果保存到文件夹: C:/Users/DELL/Desktop/1/_video_out/沼泽之铁-北境暗黑民谣-mp4,
临时文件夹: C:/Users/DELL/Desktop/字幕/tmp/32324/e3b898b2c7
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
输出字幕格式: 目标语言在下双字幕


=
system:Windows-10-10.0.19045-SP0
version:v4.11
frozen:True
language:zh
root_dir:C:/Users/DELL/Desktop/字幕

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因mkl_malloc: failed to allocate memory 是 Intel MKL 库在加载 faster-whisper 的 large-v3-turbo 模型时内存分配失败。由于你未启用 CUDA 加速(纯 CPU 模式),模型需完整加载进系统内存,large-v3-turbo 模型体积较大,当系统可用 RAM 不足或内存碎片严重时就会触发此错误。

解决办法(按优先级尝试)

  1. 释放系统内存

    • 关闭浏览器、大型软件、其他占用内存的程序,确保有 8GB 以上 可用物理内存再重试。
  2. 改用更小的模型

    • 在主界面语音识别渠道的模型下拉框中,将 large-v3-turbo 改为 mediumsmall(推荐先试 medium)。越小越省内存,速度也更快。
  3. 降低内存与计算占用

    • 进入 菜单 → 工具 → 高级选项 → 语音识别参数

      • 计算数据类型 改为 int8(最省内存)
      • 识别准确度beam_size识别准确度best_of 都改为 1
      • 取消勾选 启用上下文感知
    • 保存后重启软件再执行。
  4. 启用 CUDA(如有 NVIDIA 显卡)

    • 如果你有 NVIDIA 显卡且已配置好 CUDA 12.8 + cuDNN 9.11,在主界面勾选 CUDA加速,让模型加载到显存中,可完全避开系统内存限制。
  5. 检查模型文件是否损坏

    • 若以上均无效,请删除 models/ 目录下的 models--mobiuslabsgmbh--faster-whisper-large-v3-turbo 文件夹,重新运行让软件自动下载完整模型(不完整模型也可能诱发内存分配异常)。

请查阅相关文档:

Thinking...
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 via ko-fi.com

Related resource