#8961 语音识别阶段出错[faster-whisper(内置)] Subprocess Error: module 'decoders' has no attribute 'DecodeStream'Traceback (most recent c

120.40**2 Posted at: 8 hours ago

语音识别阶段出错[faster-whisper(内置)] Subprocess Error: module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 85, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 178, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whisper.py", line 39, in _exec
File "videotrans\recognition\_whisper.py", line 141, in _faster
File "videotrans\configure\base.py", line 300, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: module 'decoders' has no attribute 'DecodeStream'

trk=翻译视频 单视频模式
选择音视频文件: C:/Users/Administrator/Documents/uf.mp4,
输出目录: C:/Users/Administrator/Documents/_video_out/uf-mp4,
self.cfg.cache_folder='D://tmp/11040/74aa30df45'
已选 清理已生成, 未选 启用硬件加速
已选 降噪,降噪模型:dpdfnet2.onnx
语音识别:faster-whisper(内置), distil-large-v3, 发音语言: 英语
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:3
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:微软(免费),发音语言:英语,目标语言:简体中文
传统翻译渠道每批字幕行数: 5
配音渠道:Edge-TTS(免费), 配音角色:Xiaoxiao(Female/CN), 目标语言:简体中文
Volume:+0%, Speed:+0%, 已选 配音加速, 已选 视频慢速
已选 移除每条字幕配音开头结尾静音缓冲
静音移除力度: default
已选: 二次语音识别, 二次识别所用模型: large-v3-turbo
二次识别最长语音持续(秒): 2s
二次识别最短语音持续(毫秒): 1000ms
已选 识别说话人: 不限数量
说话人分离模型: built
嵌入硬字幕
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
已选 仅输出mp4
video duration:1899064ms
video information:{'video_fps': 18.18, 'r_frame_rate': 18.18, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 640, 'height': 368, 'time': 1899064, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='74aa30df45', name='C:/Users/Administrator/Documents/uf.mp4', dirname='C:/Users/Administrator/Documents', noextname='uf', basename='uf.mp4', ext='mp4', target_dir='C:/Users/Administrator/Documents/_video_out/uf-mp4', cache_folder='D://tmp/11040/74aa30df45', is_cuda=False, source_language='英语', source_language_code='en', source_sub='C:/Users/Administrator/Documents/_video_out/uf-mp4/en.srt', source_wav='D://tmp/11040/74aa30df45/remove_noise.wav', source_wav_output='C:/Users/Administrator/Documents/_video_out/uf-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/Administrator/Documents/_video_out/uf-mp4/zh-cn.srt', target_wav='D://tmp/11040/74aa30df45/target.wav', target_wav_output='C:/Users/Administrator/Documents/_video_out/uf-mp4/zh-cn.m4a', translate_type=1, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Xiaoxiao(Female/CN)', voice_autorate=True, video_autorate=True, remove_silent_mid=False, align_sub_audio=True, tts_model_name=None, detect_language='en', recogn_type=0, model_name='distil-large-v3', shibie_audio=None, remove_noise=True, enable_diariz=True, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='C:/Users/Administrator/Documents/_video_out/uf-mp4/uf.mp4', novoice_mp4='D://tmp/11040/74aa30df45/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D://tmp/11040/74aa30df45/instrument.wav', vocal='D://tmp/11040/74aa30df45/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=True, recogn2pass=True, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=1899064


=
system:Windows-10-10.0.19045-SP0
version:v4.19
frozen:True
language:zh_CN
root_dir:D:/

1 Replies

#1 DeepSeek reply at 8 hours ago

该报错发生在 faster-whisper 子进程内部,属于 Python 依赖库冲突:软件运行环境中的 decoders 模块与实际调用的库版本不匹配(版本过旧或被错误覆盖),并非模型或视频本身的问题。此类情况多由「只覆盖了 sp.exe、旧版 __pycache__ 缓存残留、补丁包未全量覆盖」引起。

处理步骤:

  1. 先备份配置文件:打开 软件目录/videotrans/,复制 cfg.json、params.json 到其他位置(这两个文件保存着你的密钥和全部设置,重装后可还原)。
  2. 到官网下载与当前版本一致的 完整包(约 2.6GB+,不是 260MB 的补丁包),解压到全新目录(如 D:\pyvideotrans2,路径只用英文数字),不要直接在旧目录上覆盖。
  3. 若只想修复旧目录:在旧版本的 _internal 文件夹内搜索 __pycache__,将搜索到的所有文件和文件夹全部删除,然后用完整包内的 sp.exe、_internal、videotrans 等全部文件和文件夹覆盖(仅覆盖 sp.exe 无效,这正是本类报错的常见成因)。
  4. 覆盖完成后重新启动软件,再执行同一视频的任务。若你之前手动改过 videotrans 内的提示词文件,请提前备份,否则会被覆盖。

补充排查:你当前勾选了 识别说话人(模型 built)和 降噪(dpdfnet2.onnx)。若换完整包后依然复现,可先取消 识别说话人、取消 降噪 再试一次,用于区分是 ASR 子进程依赖问题还是分离模型依赖问题。

若上述操作后仍报同一错误,暂无法确定具体原因。请提供软件安装目录下 logs/ 文件夹中最新日志文件底部约 30 行报错信息(含 decoders 相关完整堆栈)以便分析。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource