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

103.144**0 Posted at: 2 hours 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 86, in faster_whisper
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

Traceback (most recent call last):

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

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

File "videotrans\task\speech2text.py", line 100, in recogn

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

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

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

File "videotrans\recognition\_whisper.py", 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 86, in faster_whisper
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
[SpeechToText]语音转录: self.out_format='srt',self.copysrt_rawvideo=False,self.spk_insert=True
[TaskCfgSTT]
原始输入文件名: D:/Study_Materials/课程素材/音频/接地1.mp3,
输出结果保存到文件夹: D:/Software/pyvideotrans/output/recogn,
临时文件夹: D:/Software/pyvideotrans/tmp/11220/328fe92697
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo 断句方式:默认断句
发音语言:ru
未选 降噪
代理地址:http://127.0.0.1:7897


=
system:Windows-10-10.0.22631-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/Software/pyvideotrans

1 Replies

#1 DeepSeek reply at 2 hours ago

该报错 mkl_malloc: failed to allocate memory 的根源是 内存分配失败,通常由以下两种原因之一引起:

  1. GPU 显存不足:你已启用 CUDA 加速,且使用的是 faster-whisperlarge-v3-turbo 模型,该模型本身需要约 6GB 显存,如果显存不足或已被其他程序占用,就会报此错。
  2. 系统内存(RAM)不足:即使使用 CUDA,faster-whisper 在初始化模型时也会占用一定量的 CPU 内存,如果系统物理内存被其他任务耗尽,同样可能触发该错误。

解决步骤(按优先级尝试)

  1. 降低识别模型:将语音识别模型从 large-v3-turbo 改为 mediumsmallbase 模型,显存/内存占用会大幅下降。
  2. 关闭 CUDA 加速:如果显存确实不足,可以取消勾选 启用CUDA加速,改用 CPU 运行(速度会更慢,但能避免显存错误)。
  3. 调整数据类型:进入 菜单 -> 工具 -> 高级选项 -> 语音识别参数,将 计算数据类型 设置为 float16(推荐有 GPU 时)或 int8(最省资源)。
  4. 降低识别精度参数:在同一个高级选项页面中,将 识别准确度beam_size识别准确度best_of 都设为 1,减少显存/内存消耗。
  5. 关闭“上下文感知”:将 启用上下文感知 设为 False
  6. 释放系统资源:关闭其他占用显卡或内存的软件(如浏览器、视频播放器、游戏等),然后重启软件再试。
  7. 检查模型完整性:如果以上调整后仍报错,建议删除 软件目录/models/ 下的 models--Systran--faster-whisper-large-v3-turbo(或对应的模型文件夹),重新下载完整模型。
  8. 升级软件:你的版本是 v4.10,建议升级到 v4.12(最新版),其中对 VAD 切分和模型加载做了优化,可能修复此类问题。

其他注意事项

  • 你的代理地址是 http://127.0.0.1:7897,这主要影响在线模型下载在线 API 请求,对本地模型加载不直接相关。但如果模型下载不完整,也有可能间接引发加载异常,请确保模型已完整下载。
  • 若仍无法解决,请提供软件安装目录下 logs/ 文件夹中最新的日志文件(复制底部约30行报错信息),以便进一步分析。

请查阅相关文档:

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