-1

here is my script so far:

subject$ = "1307_2014_Feb_11_1153LDAlong\"
directory$ = "E:\data\speech\MMN\" +subject$
writeInfoLine ("Reading directory ",directory$)

strings = do ("Create Strings as file list...", "fileList", subject$ + "*.wav")
numberOfFiles = do ("Get number of strings")

for ifile to numberOfFiles
    selectObject (strings)
    fileName$ = do$ ("Get string...", ifile)
    writeInfoLine (fileName$)
    something = do ("Read from file...", subject$ + fileName$)
    selectObject ("Sound "+fileName$- ".wav")
select Intensity 'soundname$'
fileappend "'textfile$'" 'newline$'
Save as text file: "E:\data\speech\MMN\nat_int

endform

Any pointers? I can't get it to work.

I appreciate your help.

Goldie

Erik Virtel
  • 810
  • 2
  • 9
  • 27
  • The script as it is won't run because it is incomplete: at the very least, the `endform` at the bottom is the end of a block that never starts and there are undefined variables (eg. `soundname$`, `textfile$`). And besides, it's not clear what you are trying to do. – jja Aug 08 '14 at 22:22

1 Answers1

1

In fact, I don't know what you want to do with your script, so I tried to revised your script which could write down the names of the intensity files you created.

form name
    sentence subject 1307_2014_Feb_11_1153LDAlong\
    sentence directory  E:\data\speech\MMN\
endform


strings = do ("Create Strings as file list...", "fileList", subject$ + "\*.wav")
numberOfFiles = do ("Get number of strings")

for ifile to numberOfFiles
    selectObject (strings)
    fileName$ = do$ ("Get string...", ifile)
    appendInfoLine (fileName$)
    something = do ("Read from file...", subject$ +"\"+ fileName$)
    selectObject (something)
    intensity = do("To Intensity...", 100, 0, "yes")
    name$ = selected$("Intensity")
    appendFileLine("E:\data\speech\MMN\nat_int\name.txt", name$)
endfor`
Ping Tang
  • 415
  • 1
  • 9
  • 20