###################################################################### #### Robert Felty #### 2005 #### This script comes with no warranty. Use at your own risk ## this script accomplishes two tasks - ## 1. cut stimulus from carrier phrase and append silence ## then write to .wav file ## 2. make some basic measurements on the vowel ## The first part requires the user to highlight the portion of the sound file ## which contains the stimulus ## The second part requires the user to highlight only the vowel portion ###################################################################### ##gets user input form phoneme input comment What is your name? choice name 1 button rob button dan button ryan button kristin button jose endform #get start and end point of selection if name = 1 #outdirexp$ ='outdir$'/'name$' #Mac outdir$ = "/afs/lsa.umich.edu/group/ling/labs/phonetics/UROP/praatPractice/edited/" elsif name = 2 outdir$ = "C:\Documents and Settings\labuser\Desktop\practiceMeasurements\edited\dan\" elsif name = 3 outdir$ = "C:\Documents and Settings\labuser\Desktop\practiceMeasurements\edited\ryan\" elsif name = 4 outdir$ = "C:\Documents and Settings\labuser\Desktop\practiceMeasurements\edited\kristin\" elsif name = 5 outdir$ = "/afs/lsa.umich.edu/group/ling/labs/phonetics/UROP/stimuli05/scratch/" endif #outdirexp$ ='outdir$'\'name$' #PC Close #get name of selected sound word$ = selected$ ("Sound") Create Sound... silence 0 0.1 44100 0 select Sound 'word$' editor Sound 'word$' #get start and end point of selection begin = Get start of selection end = Get end of selection Move begin of selection to nearest zero crossing Move end of selection to nearest zero crossing Extract selection endeditor select Sound 'word$' Remove select Sound silence Copy... silence2 select Sound silence plus Sound untitled plus Sound silence2 Concatenate Rename... 'word$' Scale peak... 0.9999 Write to WAV file... 'outdir$''word$'.wav select Sound untitled plus Sound silence plus Sound silence2 Remove #print to info window printline 'word$' 'tab$' 'begin:4' 'tab$' 'end:4' select Sound 'word$' Edit