#816 RuntimeError: Cannot load the vocabulary from the model directory

*30.128* Posted at: 17 hours ago 👁7

语音识别阶段出错:Cannot load the vocabulary from the model directory[faster-whisper(本地)]:

Traceback (most recent call last):

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

File "videotrans\task\_speech2text.py", line 93, in recogn

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

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

File "videotrans\recognition\_overall.py", line 144, in _exec

RuntimeError: Cannot load the vocabulary from the model directory

=====

Windows-10-10.0.19045-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于 faster-whisper 模型文件下载不完整或损坏导致的。faster-whisper 需要下载完整的模型文件才能正常工作,包括词汇表文件。

解决方案:

1. 删除损坏的模型文件

  • 前往软件目录下的 models/faster-whisper 文件夹
  • 删除对应的模型文件夹(如 large-v3medium 等)
  • 重新启动软件,它会自动重新下载模型

2. 如果自动下载失败,请使用专用下载工具

由于国内网络环境问题,从 huggingface 下载模型经常失败,建议:

  • 访问 https://pyvideotrans.com/faster-whisper-download
  • 下载对应的模型下载工具
  • 将下载的 EXE 文件放在软件目录下,双击运行即可自动下载

3. 手动下载模型(备选方案)

  • 前往 https://github.com/jianchang512/stt/releases/tag/0.0
  • 下载你需要的模型压缩包
  • 解压到软件的 models/faster-whisper 文件夹中

重要提示:

  • 如果使用科学上网,可以在软件目录下创建 huggingface.lock 文件,这样软件会从官网直接下载,成功率更高
  • 确保下载过程中网络稳定,避免中断
  • 下载完成后重新启动软件即可正常使用

如果问题仍然存在,请检查软件目录下 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