Makememo / Makememo/MemoAI

[Bug] VAD 分段导致字幕句子在中间被切断,跨两条时间轴显示

Open
#417 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
No language data
Stars
1.1k
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Whisper 转写生成 SRT 字幕时,启用 VAD(Voice Activity Detection)切分音频。VAD 根据静音点切分,但静音点不一定是句子边界,导致大量字幕条目的句子在中间被截断,后半句分到另一条时间轴。

具体表现:
- 一条完整的英文句子被切成两半,分属连续的两条 SRT 条目
- 断点位置是说话人的自然换气/稍长停顿,而不是句号、逗号等语法边界
- 阅读时需要前后对照,影响观看体验

To Reproduce

Steps to reproduce the behavior:
1. 在 Memo 中导入一个英语视频/音频文件(例如 YouTube "I Made a High-Pressure Hammer")
2. 使用本地 Whisper 模型(ggml-medium.bin),启用 VAD
3. 生成字幕并导出 SRT
4. 打开 SRT 文件,观察连续字幕条目的文本

实际输出示例:

79   00:07:15,360 --> 00:07:19,840
I just wanna see if by pushing the front plate the valve actually activates and releases the

80   00:07:19,840 --> 00:07:33,520
burst of pressure. And well, it really does.


以及:

185  00:17:43,840 --> 00:17:49,040
I spent months on the project of this hammer and I literally never,

186  00:17:49,040 --> 00:17:53,840
like not once, thought about the most important thing for a sledgehammer.


Expected behavior

字幕条目应该在完整的句子边界处切分,而非 VAD 静音点。期待的输出:

79   00:07:15,360 --> 00:07:33,520
I just wanna see if by pushing the front plate the valve actually activates and releases the burst of pressure. And well, it really does.


即:当相邻两条字幕的文本首尾可以拼接成完整句子时,合并为一条字幕(或重新对齐时间轴)。

Screenshots
Image
Desktop (please complete the following information):
 - OS: macOS 15.5 (Apple M5)
 - Model: ggml-medium.bin
 - Version: Memo 最新版(日志显示 2026-06-14)

Additional context

从日志可以看到当前的 Whisper 调用参数:

whisper-cli ... --vad -vm ggml-silero-v6.2.0.bin -ojf ...


VAD 切分以无声段为边界,但说话人可能在"and I literally never, / like not once"这类语法结构中间换气,导致 VAD 在此处切断。建议增加一个后处理步骤:

1. 将 VAD 输出的原始片段送入 LLM 做句子边界重对齐(合并被切断的句子)
2. 或者在导出 SRT 前进行一次相邻条目的文本拼接检测:如果条目 A 的尾部不以句号/问号/感叹号结束,且条目 B 的开头是小写字母,则合并两者

I Made a High-Pressure Hammer [Cm8mPl5a_eI].txt

日志和完整字幕文件可供参考(日志中包含完整的 190 条 SRT [输出,可复现所有断句位置)。[](url)](

2026-06-14.log

)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the attached 2026-06-14.log, full SRT output, and the documented whisper-cli VAD invocation. Compare adjacent subtitle entries where a sentence is split at a pause, then determine whether the export path can merge such entries without losing timing. Done means generated SRT subtitles preserve sentence boundaries while retaining usable timestamps.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.