#1519 RuntimeError: 'NoneType' object is not subscriptable

205.185* Posted at: 2 hours ago 👁7

语音识别阶段出错:[openai-whisper(本地)] 运行时错误:'NoneType' object is not subscriptable:
Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\_speech2text.py", line 91, in recogn
File "videotrans\recognition\__init__.py", line 178, in run
File "videotrans\recognition\_base.py", line 78, in run
File "videotrans\recognition\_openai.py", line 132, in _exec
RuntimeError: 'NoneType' object is not subscriptable


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

1 Replies

这个错误是 openai-whisper 本地语音识别模块在处理音频时,未能正确获取识别结果导致的。请按照以下步骤排查和解决:

  1. 检查音频文件:确认您处理的视频或音频文件本身是有效的,并且包含清晰可辨的语音。可以尝试用其他播放器播放确认。
  2. 切换语音识别渠道:这是最直接有效的解决方法。请在主界面的“语音识别渠道”下拉菜单中,将 openai-whisper(本地) 切换为 faster-whisper(本地)faster-whisper 是该软件更稳定、更推荐的本地识别引擎。
  3. 检查模型文件:如果您坚持使用 openai-whisper,请确保其所需的模型文件已正确下载。模型通常存放在用户主目录下的 .cache/whisper 文件夹中。您可以尝试在软件的高级选项中设置网络代理,或手动下载模型文件。
  4. 提供完整日志:如果以上方法均无效,请提供完整的错误日志以便进一步分析。日志文件位于软件根目录下的 videotrans/logs 文件夹内,请提供其中最新的日志文件内容。

建议优先尝试第2步,切换为 faster-whisper 渠道。

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