点击查看 Edge-TTS 配音渠道无法使用的解决办法!!!

#1972 numpy.core._exceptions._ArrayMemoryError: Unable to allocate 221. MiB for an array with shape (57904994,) and data type

39.144* Posted at: 2 days ago 👁17

Traceback (most recent call last):
File "videotrans\process\_overall.py", line 128, in run
File "faster_whisper\transcribe.py", line 876, in transcribe
File "faster_whisper\audio.py", line 69, in decode_audio
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 221. MiB for an array with shape (57904994,) and data type float32


=
system:Windows-10-10.0.26100-SP0
version:v3.89
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-3.89_20251210_143714

1 Replies

这个错误是 显存(GPU内存)不足 导致的。当使用 faster-whisper 进行语音识别时,软件尝试将音频文件解码为一个巨大的浮点数组(这里需要约221MB),但您的GPU显存不足以容纳。

请按以下步骤解决:

  1. 立即操作(主界面):

    • 在软件主界面的 第2行“语音识别” 区域,将模型从 large-v2large-v3 更换为更小的模型,例如 mediumsmalltiny 最快但准确率最低。
  2. 高级设置(核心调整):

    • 点击主界面右下角的 “设置更多参数” 按钮,或从菜单进入 工具 -> 高级选项
    • “Faster/OpenAI/Whisper语音识别微调” 区域,进行以下关键修改:

      • CUDA数据类型:float32 改为 float16int8。这能显著减少显存占用。
      • 识别准确度 (beam_size): 将数值从默认的 5 改为 1
      • 识别准确度 (best_of): 同样将数值从默认的 5 改为 1
    • (可选)“通用设置” 区域,勾选 “批量翻译时强制串行”,确保每次只处理一个任务。
  3. 识别模式调整:

    • 在主界面第2行,将识别模式从 “整体识别” 切换为 “批量推理”。此模式会先将音频切片再处理,对显存更友好。

完成以上调整后,重新运行任务。如果问题依旧,请提供 D:/win-pyvideotrans-3.89_20251210_143714/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

Similar issues already exist

Trending Questions