þÿ############################################################### # measureLiquids.praat (Written by Kyuchul Yoon, kyoon@yu.ac.kr ############################################################### # Given a long sound file, this script prompts the user to # labels target words one by one and presents the labeled target # words for measuring the liquid(s). # A separate text file containing the list of target words in # one column needs to be in the same folder as this script. ############################################################### form Specify parameters word inputFile_(name_of_sound_file_without_dot_wav) É-¬²äÅ`2 word targetWordList_(containing_the_list_of_target_words) targetList.txt word tierName1_(tier_of_target_word) target word tierName2_(tier_of_liquid) liquid real windowSizeTarget_(size_of_sound_window_in_sec) 1.4 real windowSizeLiquid_(size_for_measuring_liquid_in_sec) 0.6 comment A text log file with the inputFile prefix will be created endform Read Strings from raw text file... 'targetWordList$' numOfWords = Get number of strings Rename... targetWordListObj logName$ = inputFile$ + ".txt" fileappend 'logName$' word'tab$'L_start'tab$'L_end'newline$' Open long sound file... 'inputFile$'.wav Rename... longSoundObj To TextGrid... 'tierName1$' 'tierName2$' Rename... longTextGridObj plus LongSound longSoundObj Edit interval = 2 windowRightMargin = windowSizeTarget windowLeftMargin = 0 for i to numOfWords select Strings targetWordListObj currentTargetWord$ = Get string... i editor TextGrid longTextGridObj Select... windowLeftMargin windowRightMargin Zoom to selection pause Select the target word and press Continue! start = Get start of selection end = Get end of selection endeditor select TextGrid longTextGridObj Insert boundary... 1 start Insert boundary... 1 end Set interval text... 1 (interval*i) 'currentTargetWord$' windowLeftMargin = windowRightMargin windowRightMargin = windowRightMargin + windowSizeTarget endfor