#2945 语音识别阶段出错 [faster-whisper(本地)] 程序内部错误:module 'decoders' has no attribute 'DecodeStream'concurrent.futures.process._Remote

104.251* Posted at: 2 hours ago 👁10

语音识别阶段出错 [faster-whisper(本地)] 程序内部错误:module 'decoders' has no attribute 'DecodeStream'
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "concurrent\futures\process.py", line 243, in _process_worker
File "videotrans\process\stt_fun.py", line 162, in faster_whisper
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

from faster_whisper.transcribe import BatchedInferencePipeline, WhisperModel

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

import tokenizers

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
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 106, in run
File "videotrans\task\_speech2text.py", line 156, in recogn
File "videotrans\recognition\__init__.py", line 276, in run
File "videotrans\recognition\_base.py", line 140, in run
File "videotrans\recognition\_overall.py", line 63, in _exec
File "videotrans\recognition\_overall.py", line 142, in _faster
File "videotrans\configure\_base.py", line 272, in _new_process
File "concurrent\futures\_base.py", line 446, in result
File "concurrent\futures\_base.py", line 391, in __get_result
AttributeError: module 'decoders' has no attribute 'DecodeStream'
TaskCfg(cache_folder='G:/pyvideotrans/tmp/10252/7ef12b446f', target_dir='c:/users/nh55/videos/pyvideotrans/recogn', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub="c:/users/nh55/videos/pyvideotrans/recogn/EVERYONE'S REACTION TO THE LONG AWAITED MORO ARC IN DRAGONBALL SUPER!.srt", source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles='', novoice_mp4=None, noextname="EVERYONE'S REACTION TO THE LONG AWAITED MORO ARC IN DRAGONBALL SUPER!", shibie_audio="G:/pyvideotrans/tmp/10252/7ef12b446f/EVERYONE'S REACTION TO THE LONG AWAITED MORO ARC IN DRAGONBALL SUPER!-1769527947.155392.wav", targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=None, recogn_type=0, model_name='distil-large-v3.5', voice_autorate=False, video_autorate=False, cuda=False, name="E:/EVERYONE'S REACTION TO THE LONG AWAITED MORO ARC IN DRAGONBALL SUPER!.mp4", basename="EVERYONE'S REACTION TO THE LONG AWAITED MORO ARC IN DRAGONBALL SUPER!.mp4", ext='mp4', dirname='E:/', shound_del_name=None, uuid='7ef12b446f', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False, fix_punc=False, recogn2pass=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.95
frozen:True
language:zh
root_dir:G:/pyvideotrans

1 Replies

这是由于 faster-whisper 依赖的 tokenizers 库版本不兼容或损坏导致的。

解决方案:

  1. 清理并重新下载模型

    • 关闭 pyVideoTrans 软件。
    • 进入软件根目录下的 models 文件夹。
    • 删除与 faster-whisper 相关的模型文件夹(例如 models--Systran--faster-whisper-*models--guillaumekln--faster-whisper-*)。
    • 重新启动软件,让它重新下载模型。
  2. 如果问题依旧,尝试手动下载模型

    • 从 HuggingFace 镜像站(如 hf-mirror.com)手动下载 faster-whisper 模型文件(例如 distil-large-v3.5)。
    • 将下载的模型文件夹(需保持原始文件夹结构)放入 models 目录,文件夹命名需严格遵循规则(如 models--Systran--faster-whisper-distil-large-v3.5)。
  3. 检查环境(仅适用于预打包版)

    • 确保软件解压路径不含中文、空格或特殊符号(例如 G:\pyvideotrans 是合规的)。
    • 如果之前运行过其他版本的 pyVideoTrans,请确保当前版本是独立的,未与其他版本共享 models 文件夹。
  4. 备用方案

    • 暂时切换到其他语音识别渠道,如 openai-whisper(本地)或在线 API(如 OpenAI、阿里百炼),以完成当前任务。

如果以上步骤均无效,请提供 logs 文件夹中最新日志文件的底部约30行内容,以便进一步分析。

请查阅相关文档:

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