#7100 语音识别阶段出错[Huggingface_ASR(内置)] Could not load model D:/win-pyvideotrans-v4.11/models/models--kotoba-tech--kotoba-whisper-

182.147**1 Posted at: 1 hour ago

语音识别阶段出错[Huggingface_ASR(内置)] Could not load model D:/win-pyvideotrans-v4.11/models/models--kotoba-tech--kotoba-whisper-v2.0 with any of the following classes: (, , ). See the original errors:

while loading with AutoModelForCTC, an error is thrown:
Traceback (most recent call last):
File "D:\win-pyvideotrans-v4.11\_internal\transformers\pipelines\base.py", line 232, in load_model

model = model_class.from_pretrained(model, **kwargs)

File "D:\win-pyvideotrans-v4.11\_internal\transformers\models\auto\auto_factory.py", line 397, in from_pretrained

raise ValueError(

ValueError: Unrecognized configuration class for this kind of AutoModel: AutoModelForCTC.
Model type should be one of Data2VecAudioConfig, HubertConfig, LasrCTCConfig, ParakeetCTCConfig, SEWConfig, SEWDConfig, UniSpeechConfig, UniSpeechSatConfig, Wav2Vec2Config, Wav2Vec2BertConfig, Wav2Vec2ConformerConfig, WavLMConfig.

During handling of the above exception, another exception occurred:

Traceback (mos
......
loading with WhisperForConditionalGeneration, an error is thrown:
Traceback (most recent call last):
File "D:\win-pyvideotrans-v4.11\_internal\transformers\pipelines\base.py", line 232, in load_model

model = model_class.from_pretrained(model, **kwargs)

File "D:\win-pyvideotrans-v4.11\_internal\transformers\modeling_utils.py", line 4118, in from_pretrained

checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(

File "D:\win-pyvideotrans-v4.11\_internal\transformers\modeling_utils.py", line 613, in _get_resolved_checkpoint_files

raise OSError(

OSError: Error no file named model.safetensors, or pytorch_model.bin, found in directory D:/win-pyvideotrans-v4.11/models/models--kotoba-tech--kotoba-whisper-v2.0.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\win-pyvideotrans-v4.11\_internal\transformers\pipelines\base.py", line 248, in load_model

model = model_class.from_pretrained(model, **fp32_kwargs)

File "D:\win-pyvideotrans-v4.11\_internal\transformers\modeling_utils.py", line 4118, in from_pretrained

checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(

File "D:\win-pyvideotrans-v4.11\_internal\transformers\modeling_utils.py", line 613, in _get_resolved_checkpoint_files

raise OSError(

OSError: Error no file named model.safetensors, or pytorch_model.bin, found in directory D:/win-pyvideotrans-v4.11/models/models--kotoba-tech--kotoba-whisper-v2.0.
[SpeechToText]语音转录: self.out_format='srt',self.copysrt_rawvideo=True,self.spk_insert=False
[TaskCfgSTT]
原始输入文件名: C:/Users/1/Desktop/BOBB-442J.mp4,
输出结果保存到文件夹: D:/win-pyvideotrans-v4.11/output/recogn,
临时文件夹: D:/win-pyvideotrans-v4.11/tmp/1028/2adbc3d2c8
未启用CUDA加速
未选 降噪
语音识别:Huggingface_ASR(内置), kotoba-tech/kotoba-whisper-v2.0 断句方式:默认断句
发音语言:ja
未选 降噪


=
system:Windows-10-10.0.19045-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 1 hour ago

导致该报错的根本原因是:kotoba-tech/kotoba-whisper-v2.0 模型文件下载不完整或未下载成功,模型目录中缺少核心权重文件(model.safetensorspytorch_model.bin),导致 Huggingface_ASR(内置) 渠道无法加载。

请按以下步骤操作:

  1. 删除不完整的模型目录
    进入 D:/win-pyvideotrans-v4.11/models/ 文件夹,彻底删除 models--kotoba-tech--kotoba-whisper-v2.0 这个文件夹(若里面是你手动下载的文件,可先做好备份再删)。
  2. 手动重新下载完整模型
    打开浏览器,访问以下地址并下载该模型页面下的所有文件(必须包含 model.safetensorspytorch_model.binconfig.jsontokenizer.json 等):

    • 官方地址:https://huggingface.co/kotoba-tech/kotoba-whisper-v2.0/tree/main
    • 国内镜像(无需科学上网):https://hf-mirror.com/kotoba-tech/kotoba-whisper-v2.0/tree/main
  3. 按照正确目录和文件名放置
    下载后,将全部文件放进 D:/win-pyvideotrans-v4.11/models/models--kotoba-tech--kotoba-whisper-v2.0/ 文件夹内。
    注意:文件名必须保持原样,如果浏览器自动重命名了文件(如 model(2).safetensors),请改回 model.safetensors
  4. 重启软件
    关闭并重新启动 sp.exe,再次尝试翻译任务。
若嫌麻烦,且你翻译的视频不是日语,建议直接在语音识别渠道中改用 faster-whisper(内置),这是默认推荐渠道,模型下载相对更稳定,效果也可靠。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource