#1127 MemoryError: bad allocation

240e:39b* Posted at: 1 day ago 👁12

Traceback (most recent call last):
File "videotrans\process\_overall.py", line 78, in run
File "faster_whisper\transcribe.py", line 1837, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1199, in generate_segments
File "faster_whisper\transcribe.py", line 1432, in generate_with_fallback
MemoryError: bad allocation


=
system:Windows-10-10.0.26100-SP0
version:v3.82
frozen:True
language:zh
root_dir:D:/Py

1 Replies

这个错误是 faster-whisper 在处理音频时遇到了内存分配问题(MemoryError: bad allocation)。这通常发生在处理较长的音频文件或系统内存不足时。

请尝试以下解决方案:

  1. 降低内存使用:

    • 在菜单栏选择 语音识别设置
    • "识别模型大小" 从 "large" 改为 "medium" 或 "small"
    • 取消勾选 "启用VAD" (语音活动检测)
  2. 分割处理:

    • 如果视频文件很长,可以尝试将视频分割成多个较短的片段分别处理
  3. 检查系统资源:

    • 关闭其他占用内存的程序
    • 确保系统有足够可用内存
  4. 使用其他识别渠道:

    • 如果问题持续,可以尝试切换到 "openai-whisper(本地)" 或其他在线语音识别API

如果以上方法仍无法解决问题,请提供完整的日志文件(位于 D:/Py/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

Trending Questions