#3942 语音识别阶段出错 [openai-whisper(本地)] Traceback (most recent call last): File "videotrans\process\stt_fun.py", line 63, in open

60.179* Posted at: 3 hours ago 👁9

语音识别阶段出错 [openai-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 63, in openai_whisper
File "whisper\__init__.py", line 137, in load_model
File "whisper\__init__.py", line 91, in _download
RuntimeError: Model has been downloaded but the SHA256 checksum does not not match. Please retry loading the model.

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\_speech2text.py", line 152, in recogn
File "videotrans\recognition\__init__.py", line 265, in run
File "videotrans\recognition\_base.py", line 143, in run
File "videotrans\recognition\_overall.py", line 31, in _exec
File "videotrans\recognition\_overall.py", line 73, in _openai
File "videotrans\configure\_base.py", line 288, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 63, in openai_whisper
File "whisper\__init__.py", line 137, in load_model
File "whisper\__init__.py", line 91, in _download
RuntimeError: Model has been downloaded but the SHA256 checksum does not not match. Please retry loading the model.
TaskCfgSTT(is_cuda=True, uuid='ea4f50447d', cache_folder='D:/BaiduNetdiskDownload/win-pyvideotrans/tmp/2264/ea4f50447d', target_dir='D:/BaiduNetdiskDownload/win-pyvideotrans/output/recogn', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='D:/BaiduNetdiskDownload/win-pyvideotrans/output/recogn/演员-薛之谦.srt', target_wav=None, target_wav_output=None, name='C:/Users/ThinkPad/Downloads/演员-薛之谦.mp3', noextname='演员-薛之谦', basename='演员-薛之谦.mp3', ext='mp3', dirname='C:/Users/ThinkPad/Downloads', shound_del_name=None, detect_language='en', recogn_type=1, model_name='medium', shibie_audio='D:/BaiduNetdiskDownload/win-pyvideotrans/tmp/2264/ea4f50447d/removed_noise_1775397582.7695444.wav', remove_noise=True, enable_diariz=True, nums_diariz=0, rephrase=0, fix_punc=False)

1 Replies

这是由于 openai-whisper 模型文件下载不完整或损坏,导致 SHA256 校验失败。

解决方案:

  1. 手动清理并重新下载模型

    • 关闭 pyVideoTrans 软件。
    • 前往软件安装目录下的 models 文件夹。
    • 找到并删除与 openai-whisper 相关的模型文件夹(例如,名称包含 whisper- 的文件夹)。
    • 重新启动软件,在语音识别阶段选择 openai-whisper(本地),软件会尝试重新下载模型。
  2. 配置网络代理(如遇下载失败)

    • 如果自动下载因网络问题失败,请在软件主界面的“网络代理地址”中填写可用的代理地址(例如 http://127.0.0.1:10808),然后重试。
  3. 手动下载模型文件(推荐)

    • 如果网络不稳定,建议手动下载模型。
    • 根据你选择的模型(例如 medium),从 HuggingFace 或镜像站下载对应的模型文件。
    • 将下载的所有 .bin.json.txt 等文件,放入 models 目录下正确命名的子文件夹中(例如,对于 openai-whispermedium 模型,文件夹命名规则可参考 faster-whisper 的类似结构,或直接放置于 models/whisper-medium/ 下尝试)。
    • 启动软件,软件将使用本地已存在的模型文件。

注意: 确保软件安装路径和视频文件路径不含中文字符或特殊符号,建议使用全英文路径。

请查阅相关文档:

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.

Related resource