widened

fun widened(spans: List<WordSpan>, samples: FloatArray, sampleRate: Double, limit: Double = Rules.shared.holdLimit): List<WordSpan>(source)

Each word given the quiet on both sides of it, so that a cut along its edges keeps the consonants a recogniser leaves outside its mark.

A start goes back from its mark through the word's own sound and then through the quiet before it, and stops where the recording speaks again; an end goes on the same way. Neither passes the middle of the gap to the neighbouring mark, the ends of the recording, or limit from its own mark. An edge that meets no quiet before one of those stays where it was: with no pause between two words there is nothing to give either of them. So does an edge that would move by less than least_widening, each edge judged on its own and the distance counted in samples.