fix(postprocess): trim adjacent word overlap
Build & Push Docker Image / test (push) Failing after 11s
Build & Push Docker Image / build-and-push (push) Has been skipped

Remove residual one-word suffix-prefix carry-over between adjacent caption segments so reprocessed transcripts no longer repeat bridge words across lines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-11 23:24:21 +02:00
co-authored by Copilot
parent 6beb436687
commit 3a72bb815f
2 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ function mergeConsecutive(segments: Segment[]): Segment[] {
const MAX_CHAIN_GAP_SECS = 0.15;
const MIN_MEANINGFUL_WORDS = 2;
const MIN_MEANINGFUL_CHARS = 8;
const MIN_OVERLAP_WORDS = 3;
const MIN_OVERLAP_WORDS = 1;
function splitWords(text: string): string[] {
return text.trim().split(/\s+/).filter(Boolean);