#8925 语音识别阶段出错[Huggingface_ASR(内置)] [silero]:kw={'input_wav': 'D:/ai/6 win-videotrans-2.14/tmp/19704/b8ec4d7910/DKTM-024-17954

18.183**6 Posted at: 13 hours ago

语音识别阶段出错[Huggingface_ASR(内置)] [silero]:kw={'input_wav': 'D:/ai/6 win-videotrans-2.14/tmp/19704/b8ec4d7910/DKTM-024-1795470349.9902275.wav', 'threshold': 0.5, 'min_speech_duration_ms': 1200, 'max_speech_duration_ms': 10000, 'min_silent_duration_ms': 1000}
module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):

File "videotrans\recognition\_base.py", line 244, in _vad_split

File "videotrans\process\vad.py", line 33, in get_speech_timestamp_silero

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "pyimod02_importers.py", line 457, in exec_module

File "faster_whisper\__init__.py", line 2, in

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "pyimod02_importers.py", line 457, in exec_module

File "faster_whisper\transcribe.py", line 15, in

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "pyimod02_importers.py", line 457, in exec_module

File "tokenizers\__init__.py", line 94, in

from .implementations import (

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "pyimod02_importers.py", line 457, in exec_module

File "tokenizers\implementations\__init__.py", line 1, in

from .base_tokenizer import BaseTokenizer

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "pyimod02_importers.py", line 457, in exec_module

File "tokenizers\implementations\base_tokenizer.py", line 4, in

from tokenizers.decoders import Decoder

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "pyimod02_importers.py", line 457, in exec_module

File "tokenizers\decoders\__init__.py", line 15, in

DecodeStream = decoders.DecodeStream

AttributeError: module 'decoders' has no attribute 'DecodeStream'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

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

File "videotrans\task\job.py", line 98, in process_task

File "videotrans\task\speech2text.py", line 142, in recogn

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

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

File "videotrans\recognition\_huggingface.py", line 34, in _exec

File "videotrans\recognition\_huggingface.py", line 45, in _pipe_asr

File "videotrans\recognition\_base.py", line 175, in cut_audio

File "videotrans\recognition\_base.py", line 250, in _vad_split

videotrans.configure.excepts.SpeechToTextError: [silero]:kw={'input_wav': 'D:/ai/6 win-videotrans-2.14/tmp/19704/b8ec4d7910/DKTM-024-1795470349.9902275.wav', 'threshold': 0.5, 'min_speech_duration_ms': 1200, 'max_speech_duration_ms': 10000, 'min_silent_duration_ms': 1000}
module 'decoders' has no attribute 'DecodeStream'
trk=语音转录
self.cfg.name='E:/新建文件夹/新建文件夹/DKTM-024.mp4',
self.cfg.target_dir='E:/新建文件夹/新建文件夹',
self.cfg.cache_folder='D:/ai/6 win-videotrans-2.14/tmp/19704/b8ec4d7910'
self.cfg.is_cuda=False
语音识别:Huggingface_ASR(内置), kotoba-tech/kotoba-whisper-v2.0, 发音语言: ja
最长语音持续(秒): 10s
最短语音持续(毫秒): 1200ms
静音分割持续毫秒: 1000ms
语音阈值: 0.5
选择VAD: silero
输出格式: srt
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
self.cfg=TaskCfgSTT(uuid='b8ec4d7910', name='E:/新建文件夹/新建文件夹/DKTM-024.mp4', dirname='E:/新建文件夹/新建文件夹', noextname='DKTM-024', basename='DKTM-024.mp4', ext='mp4', target_dir='E:/新建文件夹/新建文件夹', cache_folder='D:/ai/6 win-videotrans-2.14/tmp/19704/b8ec4d7910', is_cuda=False, source_language='', source_language_code='', source_sub=None, source_wav=None, source_wav_output=None, target_language='', target_language_code='', target_sub='E:/新建文件夹/新建文件夹/DKTM-024.srt', target_wav=None, target_wav_output=None, detect_language='ja', recogn_type=8, model_name='kotoba-tech/kotoba-whisper-v2.0', shibie_audio='D:/ai/6 win-videotrans-2.14/tmp/19704/b8ec4d7910/DKTM-024-1795470349.9902275.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0)


=
system:Windows-10-10.0.26300-SP0
version:v4.19
frozen:True
language:zh_CN
root_dir:D:/ai/6 win-videotrans-2.14

1 Replies

#1 DeepSeek reply at 13 hours ago

核心原因:这是 tokenizers 原生扩展与打包环境不匹配/文件损坏 导致的(tokenizers.decoders 缺少 DecodeStream),属于安装目录内依赖文件版本不一致或残留旧缓存,与 Huggingface_ASR 模型本身无关。语音识别前的 VAD 切分需要导入 faster_whisper → tokenizers,导入失败即中断。

另注意:当前安装路径 D:/ai/6 win-videotrans-2.14 含空格,路径不规范,容易引发其他异常。

解决方案(按顺序):

  1. 关闭软件。进入 D:/ai/6 win-videotrans-2.14 目录,在 _internal 和 videotrans 文件夹内搜索 __pycache__,把搜到的所有文件和文件夹全部删除。
  2. 重新下载完整绿色包(2.7GB 以上,不是 260MB 的补丁包),解压到简短、纯英文无空格的路径,例如 D:/pyVideoTrans,然后双击该目录下的 sp.exe 运行。切勿只覆盖 sp.exe 单个文件,补丁包内所有文件和文件夹(尤其是 _internal、videotrans)都要完整覆盖。
  3. 若依旧报同样错误,可先改用识别渠道 faster-whisper(内置) + large-v3(日语效果同样很好),先完成任务;kotoba-tech/kotoba-whisper-v2.0 依赖较新的 tokenizers 运行时,旧依赖环境更易触发此问题。

如果按以上步骤操作后仍复现,请提供 D:/ai/6 win-videotrans-2.14/logs/ 下最新日志文件底部约 30 行内容。

请查阅相关文档:

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