########################################## ### 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$' # Since fileName$ contains .wav, I stripped off the extension and assigned the rest to name$ name$ = fileName$ - ".wav" To TextGrid... segment segment ###### I moved "endfor" to the end of this script so it can repeat the whole process for all files. ######endfor #select all files on object list ###### Don't you need to just select the sound file? ###### Hope commenting out the following does not cause you any problem clearinfo ###### for line from 1 to numberOfFiles ###### select all ###### name$ = selected$ ("Sound", line) ###### select Sound 'name$' # place markers select Sound 'name$' 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 select Sound 'name$' plus TextGrid 'name$' Edit pause CONFIRM TextGrid ###### Cleaning up objects before proceeding to the next file select Sound 'name$' plus TextGrid 'name$' Remove endfor ###### After you're done with all files, remove Strings object for complete object cleaning up select Strings list Remove