Skip to content

fix: improve heuristic for not combining paragraphs#560

Merged
anuejn merged 1 commit into
mainfrom
anuejn/fix_one_word_per_line
Jul 10, 2026
Merged

fix: improve heuristic for not combining paragraphs#560
anuejn merged 1 commit into
mainfrom
anuejn/fix_one_word_per_line

Conversation

@anuejn

@anuejn anuejn commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@rroohhh rroohhh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a test for this?
Also can you describe what you actually changed?

@anuejn

anuejn commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

huh, it seems like this is actually also not yet working. A test document (https://media.ccc.de/v/39c3-denkangebot-rainer-mhlhoff-ber-ki-und-autoritre-sehnschte-im-silicon-valley#t=1811) now transcribes in a way that is not better and hangs the editor quite badly. Ill have to investigate some more

@anuejn anuejn force-pushed the anuejn/fix_one_word_per_line branch 2 times, most recently from 97ecec2 to 2f5a402 Compare July 8, 2026 19:34
@anuejn anuejn requested a review from rroohhh July 8, 2026 19:34
@anuejn

anuejn commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

should be good to go now :)

@rroohhh rroohhh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we remember, why we had the "until the end of the document" behavior previously?

@anuejn

anuejn commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

The assumption was, that the whisper model will not get out of its corner of not producing sentence breaks anymore. This is mostly true but our solution lead to some even worse failure when the heuristic triggered accidentally. Basically we made a less-than-optimal trade-off.

this changes the detection heuristic for overly long sentences from the previous "longer than 30s" to a word based approach of "more than 161 words".
moreover it gets rid of the stateful approach that we would disable all recombination after the first overly long paragraph.

overall this is not a perfect approach but produces saner results than before.

this should temporarily fix the situation in which transcribee generates only one word per paragraph.
the proper fix is resetting the whisper state from time to time and will land in the future.
@anuejn anuejn force-pushed the anuejn/fix_one_word_per_line branch from 2f5a402 to a3eaa57 Compare July 10, 2026 15:22
@anuejn anuejn enabled auto-merge (rebase) July 10, 2026 15:23
@anuejn anuejn merged commit a68d878 into main Jul 10, 2026
3 checks passed
@anuejn anuejn deleted the anuejn/fix_one_word_per_line branch July 10, 2026 15:24
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.

2 participants