settledBetweenLines

fun settledBetweenLines(timings: List<WordTiming>, samples: FloatArray, sampleRate: Double, reach: Double = 0.25): List<WordTiming>(source)

Moves a line boundary out of speech and into the first resting silence in reach.

Both sides of the boundary move together. If no genuine rest is found, the measured boundary is preserved rather than replaced with a guess. The following word keeps at least 0.04 seconds and its start moves with the shared boundary.

timings must be sorted in passage and non-overlapping time order, and sampleRate must be positive.