#8523 Subprocess Error: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byteTraceback (most recent call las

171.222**7 Posted at: 2 hours ago

Subprocess Error: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 148, 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 136, in _faster
File "videotrans\configure\base.py", line 277, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte

trk=[TransCreate]: uuid='c71eab4618', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/dfq/dvrcc12.mp4,
输出结果保存到文件夹: D:/dfq/_video_out/dvrcc12-mp4,
临时文件夹: D:/win-pyvideotrans-v4.17-1028/tmp/27928/c71eab4618
已选 清理已存在
未启用CUDA加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, , 数据类型:default
翻译渠道:微软(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕, settings.get('trans_thread')=5, settings.get('aitrans_thread')=40
未选 配音角色,不进行配音
字幕: 嵌入软字幕 , precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=4451083


=
system:Windows-10-10.0.26300-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.17-1028

1 Replies

#1 DeepSeek reply at 2 hours ago

这并非语音识别本身的错误,而是 faster-whisper 子进程在返回信息时的编码问题:子进程输出的错误文本是 Windows 中文系统下的 GBK 编码,主进程却按 UTF-8 解码,因此解码失败,真正的错误原因被这条乱码覆盖掉了。报错栈中 _whisper.py -> base.py(_new_process) 正对应子进程通信位置。

排查步骤

  1. 优先怀疑模型不完整或加载失败(最可能)。当前使用 large-v3-turbo,对应目录为:
    D:/win-pyvideotrans-v4.17-1028/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo

    • 关闭软件后删除该文件夹,重新启动并再次识别,让软件重新下载;或按文档手动下载全部文件并覆盖到该目录。
    • 临时先将 识别模型 换成 small 或 medium,以测试是否能正常识别;如果可以,即可确认是模型问题。
  2. 确认软件目录及输入文件路径 仅含英文和数字,且层级较短。
    当前 D:/win-pyvideotrans-v4.17-1028 与 D:/dfq/dvrcc12.mp4 符合要求;如果曾更换过其他路径,请改回这种形式。
  3. 清除缓存残留:在 _internal 文件夹内搜索 __pycache__,并将搜索到的所有文件和文件夹删除。
  4. 确认安全软件没有拦截子进程:将软件根目录整体加入信任白名单,然后以管理员权限运行。
  5. 如果仍报同样错误,请提供日志:打开软件目录下 logs/ 文件夹中最新的 .log 文件,复制底部约 30 行发来。日志中的 DEBUG 级别信息可以显示子进程的真实报错,从而绕开这条编码错误。

请查阅相关文档:

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