Added initial segment overlap resolution logic
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user