Updated DefaultWordRunReorderWindow to 1.0

This commit is contained in:
2026-04-28 15:09:43 -05:00
parent 9cca88280f
commit 47b6727973
6 changed files with 167 additions and 11 deletions

View File

@@ -171,7 +171,7 @@ func resolveGroup(in model.MergedTranscript, group model.OverlapGroup, refToInde
speakers := groupSpeakerOrder(group, segmentsBySpeaker)
resolved := resolvedGroup{}
for speakerIndex, speaker := range speakers {
timedWords, untimedWords := gatherResolutionWords(segmentsBySpeaker[speaker], expandedStart, expandedEnd)
timedWords, untimedWords := gatherResolutionWords(segmentsBySpeaker[speaker])
if len(timedWords) == 0 {
continue
}
@@ -303,7 +303,7 @@ func groupSpeakerOrder(group model.OverlapGroup, segmentsBySpeaker map[string][]
return speakers
}
func gatherResolutionWords(segments []model.Segment, groupStart float64, groupEnd float64) ([]resolutionWord, []resolutionWord) {
func gatherResolutionWords(segments []model.Segment) ([]resolutionWord, []resolutionWord) {
timedWords := make([]resolutionWord, 0)
untimedWords := make([]resolutionWord, 0)
sequence := 0
@@ -321,9 +321,6 @@ func gatherResolutionWords(segments []model.Segment, groupStart float64, groupEn
untimedWords = append(untimedWords, candidate)
continue
}
if word.End <= groupStart || word.Start >= groupEnd {
continue
}
timedWords = append(timedWords, candidate)
}
}