#3625 TaskCfgSTT(is_cuda=False, uuid='d4c19bc720', cache_folder='E:/win-pyvideotrans-v3.86/tmp/17512/d4c19bc720', target_dir='

2602:feda* Posted at: 4 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 246, in _process_worker
File "videotrans\process\stt_fun.py", line 330, 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
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 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 33, in _exec
File "videotrans\recognition\_overall.py", line 105, in _faster
File "videotrans\configure\_base.py", line 284, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
AttributeError: module 'decoders' has no attribute 'DecodeStream'
TaskCfgSTT(is_cuda=False, uuid='d4c19bc720', cache_folder='E:/win-pyvideotrans-v3.86/tmp/17512/d4c19bc720', target_dir='e:/win-pyvideotrans-v3.86/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='e:/win-pyvideotrans-v3.86/output/recogn/[email protected]', target_wav=None, target_wav_output=None, name='G:/BitComet/MIZD-304/[email protected]4', noextname='hhd800.com@MIZD-304', basename='[email protected]4', ext='mp4', dirname='G:/BitComet/MIZD-304', shound_del_name=None, detect_language='ja', recogn_type=0, model_name='large-v2', shibie_audio='E:/win-pyvideotrans-v3.86/tmp/17512/d4c19bc720/[email protected]', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.98
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.86

1 Replies

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

  1. 请确保你使用的是 完整版 软件包,而非补丁包。如果下载的是补丁包,请重新下载完整版 .7z 压缩包。
  2. 如果问题依旧,这通常是打包环境与你的运行环境不匹配所致。建议尝试以下任一方法:

    • 方法一(推荐):升级到最新版本 v3.98 的完整包。
    • 方法二:在 Windows 上,可以尝试使用源码部署方式运行。具体步骤为:

      • 安装 Python 3.10。
      • 安装 uv 包管理器。
      • 克隆项目仓库:git clone https://github.com/jianchang512/pyvideotrans
      • 进入项目目录,执行 uv sync 安装依赖。
      • 运行 uv run sp.py 启动软件。
    • 方法三:如果上述方法均无效,请提供软件安装目录下 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