#3049 TaskCfg(cache_folder='D:/win-videotrans-v3.76/tmp/25088/17053217fb', target_dir='C:/Users/dell/Desktop/下载-mp4', remove_n

91.199* Posted at: 14 days ago 👁51

语音识别阶段出错 [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 163, 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\trans_create.py", line 358, in recogn
File "videotrans\recognition\__init__.py", line 284, in run
File "videotrans\recognition\_base.py", line 141, 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='D:/win-videotrans-v3.76/tmp/25088/17053217fb', target_dir='C:/Users/dell/Desktop/下载-mp4', remove_noise=False, is_separate=False, detect_language='zh-cn', subtitle_language=None, source_language='简体中文', target_language='英语', source_language_code='zh-cn', target_language_code='en', source_sub='C:/Users/dell/Desktop/下载-mp4/zh-cn.srt', target_sub='C:/Users/dell/Desktop/下载-mp4/en.srt', source_wav='D:/win-videotrans-v3.76/tmp/25088/17053217fb/zh-cn.wav', source_wav_output='C:/Users/dell/Desktop/下载-mp4/zh-cn.m4a', target_wav='D:/win-videotrans-v3.76/tmp/25088/17053217fb/target.wav', target_wav_output='C:/Users/dell/Desktop/下载-mp4/en.m4a', subtitles='', novoice_mp4='D:/win-videotrans-v3.76/tmp/25088/17053217fb/novoice.mp4', noextname='下载', shibie_audio=None, targetdir_mp4='C:/Users/dell/Desktop/下载-mp4/下载.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Aria(Female/US)', copysrt_rawvideo=False, clear_cache=False, translate_type=0, tts_type=0, recogn_type=0, model_name='large-v3-turbo', voice_autorate=True, video_autorate=True, cuda=True, name='C:/Users/dell/Downloads/下载.mp4', basename='下载.mp4', ext='mp4', dirname='C:/Users/dell/Downloads', shound_del_name=None, uuid='17053217fb', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=True, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.26200-SP0
version:v3.96
frozen:True
language:zh
root_dir:D:/win-videotrans-v3.76

1 Replies

这是由于 tokenizers 库版本不兼容或损坏导致的 faster-whisper 加载失败。

解决方案:

  1. 清理并重新安装依赖(适用于预打包版)

    • 关闭 pyVideoTrans 软件。
    • 进入软件安装目录(例如 D:\win-videotrans-v3.76)。
    • 找到并运行 0解压后立即点此安装运行环境.batinstall.bat 文件,重新安装和配置 Python 环境及依赖包。
  2. 手动更新 tokenizers 库(适用于源码部署)

    • 在终端中,进入 pyVideoTrans 项目目录。
    • 执行命令:uv pip install --upgrade tokenizerspip install --upgrade tokenizers
  3. 检查路径

    • 确保软件安装路径(如 D:\win-videotrans-v3.76不包含中文、空格或特殊字符。你的路径符合要求。
    • 确保你有足够的磁盘空间和权限。

如果以上步骤无法解决,请提供执行 0解压后立即点此安装运行环境.bat 后的完整日志信息。

请查阅相关文档:

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