Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
outputFN = join(root, "pumpkins_with_naive_alignment.TextGrid")
utteranceTierName = "utterance"
wordTierName = "word"
phoneListTierName = "phoneList"
phoneTierName = "phone"
tg = tgio.openTextgrid(inputFN)
for tierName in tg.tierNameList[:]:
if tierName == utteranceTierName:
continue
tg.removeTier(tierName)
tg = praattools.naiveWordAlignment(tg, utteranceTierName, wordTierName,
isleDict, phoneListTierName)
tg = praattools.naivePhoneAlignment(tg, wordTierName, phoneTierName,
isleDict)
tg.save(outputFN)