#2378 TaskCfg(cache_folder='D:/win-videotrans/tmp/44288/f63de9c6e6', target_dir='d:/win-videotrans/output/recogn', remove_nois

154.86* Posted at: 4 hours ago 👁11

语音识别阶段出错 [OpenAI语音识别API] 程序内部错误:module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):
File "videotrans\task\job.py", line 113, in run
File "videotrans\task\_speech2text.py", line 146, in recogn
File "videotrans\recognition\__init__.py", line 218, in run
File "videotrans\recognition\_base.py", line 80, in run
File "videotrans\recognition\_openairecognapi.py", line 44, in _exec
File "videotrans\recognition\_openairecognapi.py", line 90, in _thrid_api
File "videotrans\recognition\_base.py", line 135, in cut_audio
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
AttributeError: module 'decoders' has no attribute 'DecodeStream'

TaskCfg(cache_folder='D:/win-videotrans/tmp/44288/f63de9c6e6', target_dir='d:/win-videotrans/output/recogn', remove_noise=False, is_separate=False, detect_language='it', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='d:/win-videotrans/output/recogn/01. Mercoledì 17-09-25 - Live Setup Swing (Andrea Cimitan & Fabervaale).srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='01. Mercoledì 17-09-25 - Live Setup Swing (Andrea Cimitan & Fabervaale)', shibie_audio='D:/win-videotrans/tmp/44288/f63de9c6e6/01. Mercoledì 17-09-25 - Live Setup Swing (Andrea Cimitan & Fabervaale)-1767108357.991174.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=4, model_name='tiny', split_type=0, voice_autorate=False, video_autorate=False, cuda=True, name='D:/U2B+/OF++/Morpheus Education - Trincea Global Macro 2025 23v/01. Mercoledì 17-09-25 - Live Setup Swing (Andrea Cimitan & Fabervaale).mp3', basename='01. Mercoledì 17-09-25 - Live Setup Swing (Andrea Cimitan & Fabervaale).mp3', ext='mp3', dirname='D:/U2B+/OF++/Morpheus Education - Trincea Global Macro 2025 23v', shound_del_name=None, uuid='f63de9c6e6', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False)


=
system:Windows-10-10.0.26100-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/win-videotrans

1 Replies

此错误表明 faster-whisper 依赖的 tokenizers 库版本不兼容。您正在使用“OpenAI语音识别API”,但软件内部在调用 faster-whisper 进行音频预处理时发生了库冲突。

解决方案:

  1. 临时解决方案(推荐):更换语音识别渠道。

    • 在主界面“语音识别”区域,将渠道从 OpenAI语音识别API 切换为 faster-whisper(本地)阿里FunASR(本地) 等其他本地识别渠道。这可以绕过有问题的库调用。
  2. 根本解决方案:修复 tokenizers 库。

    • 如果您使用的是预打包版(sp.exe),这通常是打包环境的问题。请尝试:

      • 重新下载最新完整包:从官网下载最新的完整预打包版,并在一个纯英文路径(如 D:\videotrans)下解压运行。
      • 清理临时文件:关闭软件,删除 D:/win-videotrans/tmp/ 文件夹下的所有内容,然后重启软件重试。
  3. 如果问题持续

    • 请提供 D:/win-videotrans/logs/ 目录下的最新日志文件,以便进一步分析。

问题分析:错误栈显示,当使用“OpenAI语音识别API”时,程序会尝试导入 faster_whisper 来切割音频,但 tokenizers 库的 decoders 模块缺少 DecodeStream 属性,这通常是库版本不匹配或损坏导致的。

请查看更多参考文档:

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions