#5904 Subprocess Error: module 'decoders' has no attribute 'DecodeStream'Traceback (most recent call last):

157.85* Posted at: 2 hours ago

Subprocess Error: module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 46, in run
File "videotrans\task\trans_create.py", line 319, in recogn
File "videotrans\recognition\__init__.py", line 191, in run
File "videotrans\recognition\_base.py", line 90, in run
File "videotrans\recognition\_whisper.py", line 38, in _exec
File "videotrans\recognition\_whisper.py", line 124, in _faster
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: module 'decoders' has no attribute 'DecodeStream'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/Lenovo/Downloads/Titanfall 2 Teaser Trailer – PS4, Xbox One and PC.mp4,
输出结果保存到文件夹: C:/Users/Lenovo/Downloads/_video_out/Titanfall 2 Teaser Trailer – PS4, Xbox One and PC-mp4,
临时文件夹: C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/18556/87466d26d4
已选 清理已存在
未选 启用CUDA加速
未选 降噪
语音识别:faster-whisper(本地内置), model_name: large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:英语,目标语言:简体中文, 未选 发送完整字幕
配音渠道:Index-TTS(本地API), 角色:clone, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入硬字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 循环播放,存在分离后的纯净人声文件,存在分离后的背景声音文件
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.03
frozen:True
language:zh
root_dir:C:/Users/Lenovo/Downloads/win-videotrans-v4.03

3 Replies

module 'decoders' has no attribute 'DecodeStream' 错误通常是因为 faster-whisper 依赖的 ctranslate2 库版本不兼容,或模型文件损坏、不完整导致。

解决方案(按推荐顺序尝试):

  1. 更新软件至最新版(v4.06):你当前版本为 v4.03,该问题可能已在后续版本中修复。请到 官方下载页 下载完整包(约 2.7GB),覆盖安装即可。
  2. 重新下载模型:关闭软件,删除 软件目录/models/ 下的 models--mobiuslabsgmbh--faster-whisper-large-v3-turbo 文件夹,然后重新启动软件,它会自动重新下载。如果下载缓慢或失败,可参考 手动下载模型说明 手动放置模型。
  3. 临时切换识别渠道:将语音识别渠道改为 openai-whisper(本地内置)faster-whisper 的其他模型(如 large-v3 而非 large-v3-turbo),看看能否正常执行。
  4. 检查杀毒软件/防火墙:某些安全软件可能拦截了模型文件的正常加载,请将软件目录加入白名单。

如果以上方法均无效,请提供 logs/ 目录下最新日志文件中的详细报错堆栈(约底部 30 行),以便进一步分析。

[DEBUG] The file info after process:result={'video_fps': 60.0, 'r_frame_rate': 60.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 44700, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
[DEBUG] runffmpeg:cmd=['ffmpeg', '-hide_banner', '-nostdin', '-ignore_unknown', '-threads', '0', '-y', '-fflags', '+genpts', '-i', 'C:/Users/Lenovo/Downloads/Titanfall 2 Teaser Trailer – PS4, Xbox One and PC.mp4', '-an', '-c:v', 'copy', '-crf', '18', '-preset', 'veryfast', 'novoice.mp4']
[DEBUG] [新进程任务 开始:title='正在分离人声和背景音,可能耗时较久']
[DEBUG] 新进程任务 参数:kwargs={'input_file': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/18556/87466d26d4/441000_ac2_raw.wav', 'vocal_file': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/18556/87466d26d4/vocal.wav', 'instr_file': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/18556/87466d26d4/instrument.wav', 'uvr_models': 'spleeter'}
[DEBUG] CPU进程池:max_workers=1
[DEBUG] 可以使用 huggingface.co
[DEBUG] 分离背景声和人声成功[spleeter],耗时: 2.357s
[DEBUG] [新进程任务 title='正在分离人声和背景音,可能耗时较久'] 已返回
[DEBUG] [新进程任务 结束:title='正在分离人声和背景音,可能耗时较久'],耗时4.104469060897827s

[DEBUG] app_cfg.proxy='http://127.0.0.1:60177'
[DEBUG] 可以使用 huggingface.co
Returning existing local_dir C:\Users\Lenovo\Downloads\win-videotrans-v4.03\models\models--mobiuslabsgmbh--faster-whisper-large-v3-turbo as remote repo cannot be accessed in snapshot_download (None).
[DEBUG] [新进程任务 开始:title='STT use large-v3-turbo']
[DEBUG] 新进程任务 参数:kwargs={'detect_language': 'en', 'model_name': 'large-v3-turbo', 'logs_file': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/18556/87466d26d4/faster-en-1784363255.6940508.log', 'is_cuda': False, 'no_speech_threshold': 0.6, 'condition_on_previous_text': False, 'speech_timestamps': None, 'audio_file': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/18556/87466d26d4/en.wav', 'local_dir': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo', 'compute_type': 'auto', 'jianfan': False, 'audio_duration': 44768, 'hotwords': '', 'prompt': 'add punctuation at the end of each line, and punctuation at the end of each sentence.', 'beam_size': 5, 'best_of': 5, 'temperature': '0.0', 'repetition_penalty': 1.0, 'compression_ratio_threshold': 2.4, 'max_speech_ms': 8000, 'subtitle_srt': 'C:/Users/Lenovo/Downloads/win-videotrans-v4.03/tmp/faster-20260718-16_27_35.srt'}
[ERROR] CPU进程池回调异常: module 'decoders' has no attribute 'DecodeStream'
[DEBUG] [新进程任务 title='STT use large-v3-turbo'] 已返回
[ERROR] STT use large-v3-turbo,Subprocess Error: module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: module 'decoders' has no attribute 'DecodeStream'
[DEBUG] [新进程任务 结束:title='STT use large-v3-turbo'],耗时4.063761949539185s
[ERROR] 单视频模式翻译失败Subprocess Error: module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 46, in run
File "videotrans\task\trans_create.py", line 319, in recogn
File "videotrans\recognition\__init__.py", line 191, in run
File "videotrans\recognition\_base.py", line 90, in run
File "videotrans\recognition\_whisper.py", line 38, in _exec
File "videotrans\recognition\_whisper.py", line 124, in _faster
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: module 'decoders' has no attribute 'DecodeStream'

从日志可以看出,模型文件目录虽然存在,但加载时 ctranslate2 库报错 module 'decoders' has no attribute 'DecodeStream',这通常意味着该模型文件损坏或不完整,或者 ctranslate2 版本过旧。

按以下步骤依次尝试:

  1. 升级到最新版 v4.06:你当前使用的是 v4.03,该版本配套的 ctranslate2 库可能已过时。请务必到官方下载页下载完整包(约 2.7GB),覆盖安装新版。
  2. 彻底删除损坏模型:关闭软件后,删除以下文件夹:

    C:\Users\Lenovo\Downloads\win-videotrans-v4.03\models\models--mobiuslabsgmbh--faster-whisper-large-v3-turbo

    然后重新启动软件,它会自动重新下载完整模型文件。

  3. 若自动下载失败(尤其在国内),请参考手动下载模型页面手动将模型文件放置到上述目录。
  4. 临时切换识别模型:如急用,可将语音识别渠道改为 openai-whisper(本地内置)faster-whisper(本地内置) 的其他模型(如 large-v3 而非 large-v3-turbo)。

如果升级到 v4.06 后仍报错,请再次提供最新日志。

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource