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

#1967 numpy.core._exceptions._ArrayMemoryError: Unable to allocate 734. MiB for an array with shape (1, 480949, 400) and data

2001:da8* Posted at: 5 hours ago 👁5

Traceback (most recent call last):
File "videotrans\process\_overall.py", line 128, in run
File "faster_whisper\transcribe.py", line 916, in transcribe
File "faster_whisper\feature_extractor.py", line 215, in call
File "faster_whisper\feature_extractor.py", line 171, in stft
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 734. MiB for an array with shape (1, 480949, 400) and data type float32


=
system:Windows-10-10.0.19045-SP0
version:v3.89
frozen:True
language:zh
root_dir:D:/video/win-videotrans-v3.83

1 Replies

这是典型的显存(GPU内存)不足错误。处理长音频时,faster-whisper 需要将整个音频的频谱特征加载到显存中,如果音频文件过大或显存不足,就会导致此错误。

请按以下步骤解决:

  1. 立即解决方案(推荐):

    • 在软件主界面,将 语音识别 模式从 整体识别 改为 批量推理
    • 批量推理 模式会将长音频切分成小段处理,能显著降低单次显存占用。
  2. 进一步优化(如果“批量推理”仍报错):

    • 进入菜单 工具/选项 -> 高级选项
    • Faster/OpenAI/Whisper 语音识别 区域,进行以下设置:

      • CUDA数据类型:从 float32 改为 int8(最有效)。
      • 识别准确度 (beam_size):从 5 改为 1
      • 识别准确度 (best_of):从 5 改为 1
      • 启用上下文感知:设置为 False
    • 这些设置会牺牲少量识别精度以换取大幅的显存节省。
  3. 终极方案(如果以上均无效):

    • 更换更小的语音识别模型。在主界面 语音识别 的模型选择中,将 large-v3large-v2 更换为 mediumsmalltiny
  4. 检查路径(预防性措施):

    • 您的软件路径 D:/video/win-videotrans-v3.83 符合要求(无中文/空格)。请确保待处理的视频文件路径也不含中文和特殊符号。

请先尝试第1步,这通常能直接解决问题。如果仍有错误,请结合第2步进行调整。

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