Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- selectObject: "TextGrid Sound_IEatStinkyFish"
- Get number of tiers
- Down to Table... false 6 true false
- selectObject: "Table Sound_IEatStinkyFish"
- num_rows = Get number of rows
- word$ = ""
- # word$ will change when we see a new word in the TIER column
- # We want to tell Praat to "remember the last word we have seen"
- skeleton$ = ""
- for i from 1 to num_rows
- tmin = Get value... i tmin
- tmax = Get value... i tmax
- tier$ = Get value... i tier
- text$ = Get value... i text
- duration = tmax - tmin
- if tier$ = "words"
- # we update the word$ when we encounter "words" in TIER column
- word$ = text$
- elsif tier$ = "skeleton"
- # we update the skeleton$ when we encounter "skeleton" in TIER column
- skeleton$ = text$
- elsif tier$ = "segments"
- appendInfoLine: word$, " ", skeleton$, " ", text$, " ", duration
- endif
- endfor
- appendFile: "test.txt", info$ ( )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement