#3987 TaskCfgSTT(is_cuda=True, uuid='072f0fb71b', cache_folder='C:/software/win-videotrans-v3.68/tmp/6528/072f0fb71b', target_

240e:314* Posted at: 5 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

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

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 159, in recogn
File "videotrans\recognition\__init__.py", line 292, 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 285, 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=True, uuid='072f0fb71b', cache_folder='C:/software/win-videotrans-v3.68/tmp/6528/072f0fb71b', target_dir='C:/software/win-videotrans-v3.68/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='C:/software/win-videotrans-v3.68/output/recogn/wwww.srt', target_wav=None, target_wav_output=None, name='D:/wwww.mp4', noextname='wwww', basename='wwww.mp4', ext='mp4', dirname='D:/', shound_del_name=None, detect_language='en', recogn_type=0, model_name='large-v3', shibie_audio='C:/software/win-videotrans-v3.68/tmp/6528/072f0fb71b/wwww-1775662846.6777146.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)


=
system:Windows-10-10.0.26100-SP0
version:v3.98
frozen:True
language:zh
root_dir:C:/software/win-videotrans-v3.68

3 Replies

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

解决方案:

  1. 重新下载完整软件包:请前往官网下载最新的 完整软件包(而非升级补丁包),解压到一个全新的、路径中不含中文或特殊符号的目录(例如 D:\pyVideoTrans)。
  2. 覆盖升级:如果您已有完整包,请下载最新的升级补丁包,并严格按照说明覆盖到完整包的目录中。
  3. 检查路径:确保软件运行路径和视频文件路径均不包含中文、空格或特殊符号。
  4. 禁用安全软件:在解压和运行软件时,暂时关闭杀毒软件或将其添加到信任区,以防文件被误删或拦截。

如果问题依旧,请提供软件安装目录下 logs/ 文件夹中最新日志文件的底部约30行内容。

请查阅相关文档:

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\_speech2text.py", line 159, in recogn
File "videotrans\recognition\__init__.py", line 292, 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 285, 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'
[DEBUG] openai-whisper模式下,对large-v3模型返回的断句结果重新后修正
[DEBUG] [job] 进入执行语音识别阶段 trk.cfg=TaskCfgSTT(is_cuda=True, uuid='59f421d320', cache_folder='C:/software/win-videotrans-v3.68/tmp/6528/59f421d320', target_dir='C:/software/win-videotrans-v3.68/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='C:/software/win-videotrans-v3.68/output/recogn/wwww.srt', target_wav=None, target_wav_output=None, name='D:/wwww.mp4', noextname='wwww', basename='wwww.mp4', ext='mp4', dirname='D:/', shound_del_name=None, detect_language='en', recogn_type=1, model_name='large-v3', shibie_audio='C:/software/win-videotrans-v3.68/tmp/6528/59f421d320/wwww-1775663011.1741352.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)
[DEBUG] [recognition]__init__:kwargs={'detect_language': 'en', 'audio_file': 'C:/software/win-videotrans-v3.68/tmp/6528/59f421d320/wwww-1775663011.1741352.wav', 'cache_folder': 'C:/software/win-videotrans-v3.68/tmp/6528/59f421d320', 'model_name': 'large-v3', 'uuid': '59f421d320', 'is_cuda': True, 'subtitle_type': 0, 'recogn_type': 1, 'max_speakers': -1, 'llm_post': False, 'recogn2pass': False}
[DEBUG] BaseRecogn 初始化

这是由于 faster-whisper 和 openai-whisper 依赖的 tokenizers 库版本不兼容或损坏导致的。您遇到的 AttributeError: module 'decoders' has no attribute 'DecodeStream' 错误表明软件内部依赖的 Python 包出现了问题。

解决方案:

  1. 重新下载完整软件包:请前往官网下载最新的 完整软件包(而非升级补丁包)。下载地址:pyvideotrans.com/downpackage
  2. 全新安装:将下载的完整包解压到一个全新的、路径中不含中文或特殊符号的目录(例如 D:\pyVideoTrans)。不要解压到 C:\Program Files 或包含中文的路径。
  3. 覆盖升级(如适用):如果您已有完整包,请下载最新的升级补丁包,并严格按照说明覆盖到完整包的目录中。
  4. 检查路径:确保软件运行路径和待处理的视频文件路径均不包含中文、空格或特殊符号。
  5. 禁用安全软件:在解压和运行软件时,暂时关闭杀毒软件或将其添加到信任区,以防文件被误删或拦截。

如果问题依旧,请提供软件安装目录下 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