Function duplicate_takes

Source
pub fn duplicate_takes(
    segs: &[Segment],
    threshold: f32,
    window: f64,
) -> Vec<Vec<usize>>
Expand description

Groups of segments that say the same thing again — a flubbed line and its retakes. Each group is in time order with at least two members and the LAST one is the keeper. window is how long a silence may sit between one take and the next.

ponytail: segment against segment, so a take spanning several segments only matches segment-wise. Align token runs across segment boundaries if multi-sentence takes ever need catching.