Calculate the local speaking rate from a corpus

This script will calculate the local speaking rate in a corpus for the words on a list you provide. Note: you must have an annotated textgrid 2 durational tiers: words on one tier and segments on another. You need to provide the list of words you want the local speaking rate for. This must be in a .txt format, single column, one word per line. No “/t” or “/s” or csv formats. Put all corpus files in a folder. This parent folder may have many subfolders, this script will open your .textgrid files within these subfolders. The script searches for the words on your wordlist and calculates the local speaking rate in segments/second based on the two words before and after the wordlist word. This is all customizable. The output file will be saved in the parent folder with a listing of all occurrences throughout the corpus of each word on your wordlist, and their local speaking rate. See hashtag comments in the code for customizable options.


by Michelle Sims, Alberta Phonetics Lab, University of Alberta, May 2012