####################################################################### ### TextGrid file prep for labeling ### Adds ### 1. evenly distributed romanized word tier ### 2. default boundary index tier ### ### Written by Mary Beckman ( mbeckman@ling.osu.edu ) ### Modified by Kyuchul Yoon ( kyoon@ling.osu.edu ) ### This script should be placed in a directory where you have ### 1. the long sound file ### 2. "distrom.tcl" script that Mary wrote ### You should also have two subdirectories where ### 1. csplit-han/ directory contains the csplit sentences ### 2. csplit-rom/ directory "will" contain the romanized versions ### of the files in csplit-han/ folder ### NOTE: The output TextGrid file is written in csplit-rom/ directory ####################################################################### form Select files word longSoundFile_(without_extension) 302004 word outputRomFile_(without_extension) 302004-01 word outputTextGridFile_(without_extension) 302004-01 endform Open long sound file... 'longSoundFile$'.wav View editor LongSound 'longSoundFile$' pause Pick the beginning of utterance begin = Get cursor pause Pick the end of utterance end = Get cursor # For debugging # echo 'begin', 'end' endeditor #Note the input hangul filename is the same as the filename portion of the .rom file system /home/projects/ameritech/korean/phonetizer/han2phon csplit-han/'outputRomFile$' > csplit-rom/'outputRomFile$'.rom system ./distrom.tcl csplit-rom/'outputRomFile$'.rom 'end' 'begin' #Present an editor window for labeling Read from file... csplit-rom/'outputTextGridFile$'.TextGrid # get the number of words in the word tier, adjusting # for fact that last interval is a "" token numWords = Get number of intervals... 1 numWords = numWords - 1 # insert a "" for the beginning of the utterance breakTime = Get end point... 1 1 Insert point... 4 breakTime # loop through the words in the word tier inserting a # break index with BI value "2" after each one for i from 2 to numWords breakTime = Get end point... 1 i Insert point... 4 breakTime 2 endfor select LongSound 'longSoundFile$' plus TextGrid 'outputTextGridFile$' Edit