Skip to content

caption.js 2.3.1: a dual-speaker caption's lines are each a sentence - #294

Merged
maboa merged 1 commit into
mainfrom
fix/749-dual-speaker-fragment
Oct 30, 2026
Merged

maboa merged 1 commit into
mainfrom
fix/749-dual-speaker-fragment

Conversation

@maboa

@maboa maboa commented Oct 30, 2026

Copy link
Copy Markdown
Member

Fixes hyperaudio/hyperaudio-lite-editor#749.

A one-word turn without punctuation, "This" opening "This is Marusa." after a diarizer gave the word to the other speaker, became the second line of a dual-speaker caption ("-And we're sitting at Mozfest." / "-This"). It would equally have opened one as the first line. joinAsSecondSpeaker only asked that the previous caption held whole sentences, which any segment that fits on one line counts as, whether punctuation or a label closed it.

Each side of a dual-speaker caption is now a sentence closed by its own punctuation, by the segmenter's own test, so a fragment keeps its own caption on either side. The transcript above now gives "And we're sitting at Mozfest." / "This" / "is Marusa.", still imperfect, but no caption carries another speaker's half-word.

caption.js 2.3.1, with the type note and a test. 38 caption tests pass, 99 in all.

@maboa
maboa merged commit 8747ce1 into main Oct 30, 2026
1 check passed
@maboa
maboa deleted the fix/749-dual-speaker-fragment branch October 30, 2026 06:56
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.

Dual-speaker captions take a one-word unpunctuated turn as a whole sentence

1 participant