########################################## ### LABELING of noise onset, vowel onset, & vowel offset ### Adapted by Pauline Welby from a script written by ### Kyuchul Yoon, kyoon@ling.osu.edu ### With much help from Mary Beckman ### Calls up all specified files ########################################## form Input directory name without final slash word dirName /home/kyoon endform Create Strings as file list... list 'dirName$'/*.wav numberOfFiles = Get number of strings for ifile to numberOfFiles select Strings list fileName$ = Get string... ifile Read from file... 'dirName$'/'fileName$' To TextGrid... segment segment endfor #select all files on object list clearinfo for line from 1 to numberOfFiles select all name$ = selected$ ("Sound", line) select Sound 'name$' # place markers Edit editor Sound 'name$' pause Click NOISE START noiseBegin = Get cursor pause Click APPROXIMATE VOWEL START for ZOOMING tempLoc = Get cursor Select... -0.05+'tempLoc' 0.05+'tempLoc' Zoom... -0.05+'tempLoc' 0.05+'tempLoc' pause Click NEAREST ZERO CROSSING for FINE TUNING Move cursor to nearest zero crossing noiseEnd = Get cursor Show all Set selection to zero pause Click APPROXIMATE VOWEL END for ZOOMING tempLoc = Get cursor Select... -0.05+'tempLoc' 0.05+'tempLoc' Zoom... -0.05+'tempLoc' 0.05+'tempLoc' pause Click NEAREST ZERO CROSSING for FINE TUNING Move cursor to nearest zero crossing vowelEnd = Get cursor Close endeditor # create TextGrid files with markers at right time points select TextGrid 'name$' Insert point... 1 'noiseBegin' fricative Insert point... 1 'noiseEnd' vowelBegin Insert point... 1 'vowelEnd' vowelEnd Write to text file... 'dirName$'/'name$'.TextGrid # verify label placements ## THE FOLLOWING SECTION DOES NOT WORK (MESSES UP COUNT) ##-- NEED TO FIX #################################### variable name mismatch #################################### changed from "soundFile" to "name" select Sound 'name$' plus TextGrid 'name$' Edit pause CONFIRM TextGrid Remove