Added initial segment overlap resolution logic

This commit is contained in:
2026-04-27 15:52:53 -05:00
parent e42a2326e8
commit 1b9f4bd922
16 changed files with 1357 additions and 59 deletions

View File

@@ -26,21 +26,7 @@ func (placeholderMerger) Merge(ctx context.Context, in []model.CanonicalTranscri
}
sort.SliceStable(segments, func(i, j int) bool {
left := segments[i]
right := segments[j]
if left.Start != right.Start {
return left.Start < right.Start
}
if left.End != right.End {
return left.End < right.End
}
if left.Source != right.Source {
return left.Source < right.Source
}
if left.SourceSegmentIndex != right.SourceSegmentIndex {
return left.SourceSegmentIndex < right.SourceSegmentIndex
}
return left.Speaker < right.Speaker
return model.SegmentLess(segments[i], segments[j])
})
return model.MergedTranscript{