Skip to content

fix: align SenseVoice sentence timestamps - #3407

Merged
LauraGPT merged 1 commit into
mainfrom
codex/fix-subtitle-segmentation-3406
Jul 24, 2026
Merged

fix: align SenseVoice sentence timestamps#3407
LauraGPT merged 1 commit into
mainfrom
codex/fix-subtitle-segmentation-3406

Conversation

@LauraGPT

Copy link
Copy Markdown
Collaborator

Summary

  • align SenseVoice VAD text, punctuation tokens, and word timestamps without treating unspaced Chinese as one token
  • preserve exact surface text for contractions, URLs, and email addresses while merging BPE timestamp units
  • keep CT punctuation text and punc_array consistent when forcing a final sentence terminator

Fixes #3406

Verification

  • pytest -q tests/test_punc_model_none.py tests/test_generate_subtitle.py (12 passed)
  • focused tests/test_auto_model.py regression selection (4 passed, 1 deselected)
  • py_compile, Black check, and git diff --check
  • real 45.1-second SenseVoice Chinese audio: 12 subtitles, 0 empty, 0 punctuation-only, max 21 characters, final timestamp 44.680s, no length-mismatch warning

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

字幕功能效果不好,断句不合理,多数过长且不合语义,只有开头几句,后面大部分只有时间没有文本

1 participant