########################################## ### LABELING three intervals ### Written by Kyuchul Yoon ### kyoon@ling.osu.edu 1-30-2002 ########################################## form Select a file and parameters for spectral analysis word soundFile_(without_extension) ky_ask2 endform filedelete 'soundFile$'.TextGrid # Read in a sound file and create a TextGrid file with the same name Read from file... 'soundFile$'.wav Edit editor Sound 'soundFile$' Set selection to zero pause START of "ka" start_ka = Get cursor pause START of PAUSE start_pause = Get cursor pause START of SYLL1 start_syl = Get cursor pause END of SYLL1 end_syl = Get cursor dur_ka = (start_pause - start_ka) * 1000 dur_pause = (start_syl - start_pause) * 1000 dur_syl = (end_syl - start_syl) * 1000 Close endeditor To TextGrid... "label duration" point Insert boundary... 1 'start_ka' Insert boundary... 1 'start_pause' Insert boundary... 1 'start_syl' Insert boundary... 1 'end_syl' Set interval text... 1 2 ka Set interval text... 1 3 pause Set interval text... 1 4 syll1 # Add interval tier... 2 duration Insert boundary... 2 'start_ka' Insert boundary... 2 'start_pause' Insert boundary... 2 'start_syl' Insert boundary... 2 'end_syl' Set interval text... 2 2 'dur_ka:0' Set interval text... 2 3 'dur_pause:0' Set interval text... 2 4 'dur_syl:0' Write to text file... 'soundFile$'.TextGrid select Sound 'soundFile$' plus TextGrid 'soundFile$' Edit pause CONFIRM TextGrid Remove ####### END OF SCRIPT #######