#8096 Invalid input features shape: expected an input with shape (1, 128, 3000), but got an input with shape (1, 80, 3000) ins

240e**ab5e Posted at: 1 hour ago

Invalid input features shape: expected an input with shape (1, 128, 3000), but got an input with shape (1, 80, 3000) instead:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 139, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
ValueError: Invalid input features shape: expected an input with shape (1, 128, 3000), but got an input with shape (1, 80, 3000) instead

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 141, 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 137, in _faster
File
......
e (1, 128, 3000), but got an input with shape (1, 80, 3000) instead:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 139, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
ValueError: Invalid input features shape: expected an input with shape (1, 128, 3000), but got an input with shape (1, 80, 3000) instead

trk=[TransCreate]: uuid='c138094efb', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/GOOD/Downloads/Max_Muncy_on_Skubal_s_Arrival_a_Side_of_Ohtani_Fans_Don_t_See_Dodgers_.mp4,
输出结果保存到文件夹: C:/Users/GOOD/Downloads/_video_out/Max_Muncy_on_Skubal_s_Arrival_a_Side_of_Ohtani_Fans_Don_t_See_Dodgers_-mp4,
临时文件夹: D:/win-pyvideotrans-v4.15/tmp/36448/c138094efb
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), small, 发音语言: 英语,
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:7897, 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
trk.cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/GOOD/Downloads/Max_Muncy_on_Skubal_s_Arrival_a_Side_of_Ohtani_Fans_Don_t_See_Dodgers_.mp4,
输出结果保存到文件夹: C:/Users/GOOD/Downloads/_video_out/Max_Muncy_on_Skubal_s_Arrival_a_Side_of_Ohtani_Fans_Don_t_See_Dodgers_-mp4,
临时文件夹: D:/win-pyvideotrans-v4.15/tmp/36448/c138094efb
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), small, 发音语言: 英语,
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:7897
video_duration_ms=1510008


=
system:Windows-10-10.0.26200-SP0
version:v4.15
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.15

11 Replies

#1 DeepSeek reply at 1 hour ago

该报错发生在 faster-whisper 语音识别阶段,错误核心为输入特征形状不匹配(期望(1,128,3000),实际(1,80,3000)),结合软件版本与模型为 small,大概率是 faster-whisper 模型文件下载不完整或损坏,导致模型内部特征维度与音频特征不一致。

请按以下步骤排查:

  1. 关闭软件,进入软件安装目录下的 models 文件夹,找到 models--Systran--faster-whisper-small 文件夹,将其整个删除。
  2. 重新启动软件,再次执行同一任务,让软件重新自动下载该模型(若网络不稳定易失败,可参考下方手动下载文档)。
  3. 若删除重试后仍出现相同报错,请提供软件安装目录下 logs/ 文件夹中最新日志的底部约30行内容,以便进一步判断。

请查阅相关文档:

#2 240e**ab5e reply at 1 hour ago

能不能给我你们的github网站,并告诉我怎么重新完整下载整个程序

#3 DeepSeek reply at 1 hour ago

GitHub 仓库地址:https://github.com/jianchang512/pyvideotrans

完整下载整个程序的步骤:

  1. 打开下载页面:https://pyvideotrans.com/downpackage
  2. 下载「完整版压缩包」(约 2.7GB,已包含全部运行依赖和 ffmpeg)。

    • 注意不要只下载「补丁包」,补丁包不能单独运行。
  3. 将压缩包解压到非系统盘的纯英文路径下,例如 D:\pyVideoTrans(禁止放到含中文、空格或特殊符号的路径,也禁止直接在压缩包内双击运行)。
  4. 进入解压后的主文件夹,双击 sp.exe 启动(首次启动需等待 5 秒至 2 分钟)。
提示:若你已有配置文件(位于旧版本 videotrans 文件夹内的 params.json、cfg.json、codec.json、ass.json),可先备份,覆盖到新目录后可保留之前的设置。
#4 240e**ab5e reply at 58 minutes ago

下载完models文件夹是空的,这对吗

#5 DeepSeek reply at 58 minutes ago

是的,这是正常的。软件设计为不内置任何模型,models 文件夹初始为空,所有模型都会在第一次使用时自动在线下载。若自动下载失败,可参考手动下载说明:手动下载模型

#6 240e**ab5e reply at 50 minutes ago

10分钟视频大约需要翻译多长时间

#7 DeepSeek reply at 49 minutes ago

翻译10分钟视频所需时间不固定,取决于多个因素:硬件配置(CPU/GPU)、识别和配音所用模型大小、是否首次下载模型、在线API的响应速度等。通常而言:本地识别模型(如 faster-whisper large-v3)在 GPU 加速下约需几分钟,纯 CPU 可能需十几分钟以上;若使用 large-v3 或 F5-TTS 等大型模型,耗时可能更长;首次使用还需额外下载几个GB的模型,下载时间取决于网速。若采用在线API(如 OpenAI 识别、Edge-TTS 配音),速度通常较快,但受网络和接口限额影响。建议根据实际配置测试,并在执行时观察进度条。

#8 240e**ab5e reply at 48 minutes ago

进度一直停在4%是怎么回事

#9 DeepSeek reply at 47 minutes ago

进度停在4%通常是任务正在进行预处理或模型下载阶段,此时界面可能看似“卡住”。常见阻塞原因包括:首次使用本地模型时需在线下载较大模型文件、网络代理不通畅、或正在分析/分离音视频。请确认:当前是否正在下载模型(观察软件目录 models 文件夹内是否有文件在增长);代理地址是否填写正确,若不需要请清空;耐心等待数分钟,若长时间无变化,请提供软件安装目录下 logs/ 文件夹中最新的日志文件底部约30行内容,以便准确判断阻塞原因。

#10 240e**ab5e reply at 45 minutes ago


Application started at 2026-10-14 13:10:48

Loading resources...
Loading main window...
Initializing UI...
SetupUI end...
import recognition ...
import tts ...
import translate ...
Get cache ...
Set default value ...
import voices list ...
Set tts voice ...
[DEBUG] Version: v4.15, Frozen:True, OS: win32
上次缓存的角色:No,字幕嵌入类型:2,发音语言:en,目标语言:zh-cn,目标语言代码:None,模型:large-v3-turbo,TTS渠道[0]
show main window ...
Bind signal...
set cursor...
end
[DEBUG] app_cfg.proxy=''
[DEBUG] 无法连接 huggingface.co, 使用镜像替换: hf-mirror.com
[DEBUG] 可用 Nvidia 显卡数: 0
[DEBUG] 找到 0 个 Nvidia GPUs, 耗时: 29s
[DEBUG] 平台: Windows。正在按优先级检测最佳的 'h264' 编码器: ['nvenc', 'qsv', 'amf']
[DEBUG] CUDA 不可用,跳过 nvenc 测试。
[DEBUG] 正在测试编码器是否可用: h264_qsv...
[DEBUG] cpu_count=22,app_cfg.MAX_GPU_PROCESS=1, app_cfg.MAX_CPU_PROCESS=1, task_nums=1
[DEBUG] start 9 jobs
[DEBUG] 硬件编码器 'h264_qsv' 可用。
[DEBUG] 已选择硬件编码器: h264_qsv
[DEBUG] 最终确定使用的编码器: h264_qsv
[DEBUG] 平台: Windows。正在按优先级检测最佳的 'hevc' 编码器: ['nvenc', 'qsv'
......
免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入软字幕 , precent=1, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=False
[DEBUG] 原始输入文件信息:self.video_info={'video_fps': 29.97002997002997, 'r_frame_rate': 29.97002997002997, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1920, 'height': 1080, 'time': 405471, 'streams_len': 3, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}

[DEBUG] 语音识别前参数:{'detect_language': 'en', 'audio_file': 'D:/win-pyvideotrans-v4.15/tmp/2396/d4e0a3c1c3/en.wav', 'cache_folder': 'D:/win-pyvideotrans-v4.15/tmp/2396/d4e0a3c1c3', 'model_name': 'small', 'uuid': 'd4e0a3c1c3', 'is_cuda': False, 'subtitle_type': 2, 'recogn_type': 0, 'max_speakers': -1, 'recogn2pass': False}

[DEBUG] app_cfg.proxy=None
[DEBUG] 无法连接 huggingface.co, 使用镜像替换: hf-mirror.com
[DEBUG] 从 modelscope.cn 下载模型 model_id='small'
[DEBUG] 获取到下载锁,开始从 modelscope.cn 下载 Systran/faster-whisper-small
Downloading Model from https://www.modelscope.cn to directory: D:\win-pyvideotrans-v4.15\models\models--Systran--faster-whisper-small
2026-10-14 13:16:39,476 - modelscope - INFO - Got 6 files, start to download ...

Processing 6 items: 0%| | 0.00/6.00 [00:00

#11 DeepSeek reply at 45 minutes ago

这是模型下载停滞导致的。日志显示任务卡在从 modelscope.cn 下载 faster-whisper-small 模型阶段(共6个文件,当前0%进度),由于模型体积大且国内镜像站限速/限频,下载可能长时间无进展。

处理步骤:

  1. 耐心等待数分钟,观察 D:\win-pyvideotrans-v4.15\models\models--Systran--faster-whisper-small 文件夹内是否有文件持续增长;
  2. 若长时间无变化,可关闭软件后删除该文件夹,并更换网络环境(如切换代理或使用更稳定的网络)重新启动任务;
  3. 若仍然卡住,请按文档手动下载模型文件,放到对应目录:

请查阅相关文档:

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