golab/textgrid is a port of [textgridde-rs](https://github.com/cmlong02/textgridde-rs) [textgridde-rs includes functionality for fixing overlapping intervals and filling gaps inbetween intervals](https://docs.rs/textgridde-rs/latest/textgridde_rs/textgrid/struct.TextGrid.html) this should be easy to do with a deque