Skip to content

feat(cli): group readable subtitle cues - #3542

Merged
LauraGPT merged 1 commit into
mainfrom
codex/readable-subtitles-3539
Aug 28, 2026
Merged

feat(cli): group readable subtitle cues#3542
LauraGPT merged 1 commit into
mainfrom
codex/readable-subtitles-3539

Conversation

@LauraGPT

Copy link
Copy Markdown
Collaborator

Summary

  • group short and continuation sentence timestamps into bounded, readable subtitle cues
  • keep speaker changes, gaps over 500 ms, cues over 8 seconds, and cues over 42 characters as hard boundaries
  • make readable grouping the default for CLI SRT and the SRT/VTT example, with sentence modes preserving raw model boundaries
  • leave recognized text, punctuation, JSON, and TSV output unchanged

Validation

  • python -m pytest -q tests/test_cli.py tests/test_generate_subtitle.py (11 passed)
  • python -m compileall -q funasr/cli.py examples/subtitle/generate_subtitle.py
  • git diff --check
  • reproduced on the 309.6-second MP3 from srt断句功能智能化程度不高, 存在较大比例的明显不合理断句 #3539 with SenseVoiceSmall, FSMN-VAD, CT-Punc, CUDA 12.8, and an H100
  • subtitle cues: 174 -> 76; one-to-two-character fragments: 3 -> 0
  • pure post-processing of the same sentence result preserved text exactly and retained the first/last boundaries; maximum grouped cue was 40 characters and 5.88 seconds
  • the reported 呼吸机、 / 除颤仪, / 属于二类医疗器械。 fragments become one cue without rewriting punctuation

Closes #3539

Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
@LauraGPT
LauraGPT merged commit f48b7f9 into main Aug 28, 2026
@LauraGPT
LauraGPT deleted the codex/readable-subtitles-3539 branch August 28, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant