#9088 语音识别阶段出错[faster-whisper(内置)] Cannot load the vocabulary from the model directory,Traceback (most recent call last): Fil

103.190**2 Posted at: 35 minutes ago

语音识别阶段出错[faster-whisper(内置)] Cannot load the vocabulary from the model directory,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 49, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: Cannot load the vocabulary from the model directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 49, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: Cannot load the vocabulary from the model directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 78, in faster_whisper
File "videotrans\process\stt_faster.py", line 67, in _create_model
File "videotrans\process\stt_faster.py", line 71, in _create_model
File "videotrans\process\stt_faster.py", line 49, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: Cannot load the vocabulary from the model directory

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 85, in run
File "videotrans\task\_stage_recogn.py", line 69, in recogn
File "videotrans\recognition\__init__.py", line 167, in run
File "videotrans\recognition\_base.py", line 98, in run
File "videotrans\recognition\_whisper.py", line 41, in _exec
File "videotr
......
tt_faster.py", line 49, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: Cannot load the vocabulary from the model directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 78, in faster_whisper
File "videotrans\process\stt_faster.py", line 67, in _create_model
File "videotrans\process\stt_faster.py", line 71, in _create_model
File "videotrans\process\stt_faster.py", line 49, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: Cannot load the vocabulary from the model directory

trk=翻译视频 单视频模式
选择音视频文件: C:/Users/xtj/Downloads/January Challenge/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar.mp4,
输出目录: C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4,
self.cfg.cache_folder='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3'
已选 清理已生成, 未选 启用硬件加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:Google(免费),发音语言:英语,目标语言:简体中文
传统翻译渠道每批字幕行数: 5
配音渠道:Edge-TTS(免费), 配音角色:Xiaoxiao(Female/CN), 目标语言:简体中文
Volume:+0%, Speed:+0%, 已选 配音加速, 已选 视频慢速
已选 移除每条字幕配音开头结尾静音缓冲
静音移除力度: default
嵌入软字幕
video duration:702501ms
video information:{'video_fps': 29.97002997002997, 'r_frame_rate': 29.97002997002997, 'video_codec_name': 'av1', 'audio_codec_name': 'aac', 'width': 1280, 'height': 720, 'time': 702501, 'streams_len': 4, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='3f1c2402f3', name='C:/Users/xtj/Downloads/January Challenge/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar.mp4', dirname='C:/Users/xtj/Downloads/January Challenge', noextname='10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar', basename='10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar.mp4', ext='mp4', target_dir='C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4', cache_folder='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3', is_cuda=False, source_language='英语', source_language_code='en', source_sub='C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4/en.srt', source_wav='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3/en.wav', source_wav_output='C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4/zh-cn.srt', target_wav='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3/target.wav', target_wav_output='C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4/zh-cn.m4a', translate_type=0, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Xiaoxiao(Female/CN)', voice_autorate=True, video_autorate=True, remove_silent_mid=False, align_sub_audio=True, tts_model_name=None, detect_language='en', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='C:/Users/xtj/Downloads/January Challenge/CN/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar-mp4/10 Minute After Eating Walking Workout | Exercise to Lower Blood Sugar.mp4', novoice_mp4='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3/novoice.mp4', is_separate=False, embed_bgm=True, instrument='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3/instrument.wav', vocal='F:/Softwares/win-pyvideotrans-v4.20/tmp/23636/3f1c2402f3/vocal.wav', clear_cache=True, background_music='', subtitle_type=2, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=702501


=
system:Windows-10-10.0.19045-SP0
version:v4.20
frozen:True
language:zh_CN
root_dir:F:/Softwares/win-pyvideotrans-v4.20

1 Replies

#1 DeepSeek reply at 34 minutes ago

核心原因:faster-whisper 的 large-v3-turbo 模型文件下载不完整或已损坏,导致加载模型目录时找不到词汇表文件(tokenizer/vocabulary 等)。模型体积较大,自动下载过程中断或被安全软件拦截都会造成此类报错。

解决方案(按顺序操作):

  1. 完全关闭 pyVideoTrans。
  2. 进入 F:/Softwares/win-pyvideotrans-v4.20/models/,找到并整个删除文件夹 models--mobiuslabsgmbh--faster-whisper-large-v3-turbo(确认下载不完整时才能重新拉取)。
  3. 重新启动软件并再次执行任务,让软件自动重新下载该模型。下载期间请保持网络稳定,若已开启代理或 VPN,注意不要中途断开。
  4. 若自动下载反复失败,改为手动下载:

    • 打开 https://huggingface.co/mobiuslabsgmbh/faster-whisper-large-v3-turbo/tree/main
    • 下载该页面全部文件(model.bin、config.json、tokenizer.json、vocabulary.json、preprocessor_config.json 等)
    • 全部放入 F:/Softwares/win-pyvideotrans-v4.20/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo
    • 注意:浏览器若把文件重命名为 model(2).bin 之类,必须改回原名,否则软件识别不到。
  5. 应急方案:在语音识别模型处先换成 medium 或 small 试跑,验证是否仅为该模型文件损坏;同时确认软件根目录下不存在 netoffline.txt(该文件会强制离线加载模型,缺失即报错)。

补充提醒:不要把软件放在含中文/特殊符号路径下,并关闭或信任杀毒软件对 models 目录的扫描,避免下载中的文件被隔离。

请查阅相关文档:

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