This script requires the “textgrid” library to be installed with pip (pip install textgrid). It requires the coding scheme outlined in this document. The script can be accessed on OSF here.