I have a TextGrid file with 2 tiers, one corresponds to words and another one to syllables. I already creating a column of syllables in my table and now I need to make a column with words where each syllable should correspond to the word it belongs to. So the result should look like:
e.g. This is my sentence.
This
is
my
sentence
sentence
(I can try to explain it more thoroughly, if it is not clear.)
This is what I have so far. It works, but needs some modification.
writeInfo: ""
selectObject: "TextGrid example"
num = Get number of intervals: 2 #for the syllable tier
number = Get number of intervals: 1 #for the word tier
for m from 1 to num
ends = Get end time of interval: 2, m
for n from 1 to number
word$ = Get label of interval: 1, n
endw = Get end time of interval: 1, n
if ends == endw
appendInfoLine: word$
endif
endfor
endfor