0

I have some files. wav in the object window, how can I save them automatically?

I found this script but I get an error:

directoryName$ = chooseDirectory$: "Choose a directory to save all the new files in"
if directoryName$ <> ""
    for i to numberOfSelectedSounds
       selectObject: sound [i]
       Save as WAV file: directoryName$ + "/sound" + string$ (i) + ".wav"
    endfor
endif
1
  • 2
    I’m voting to close this question because it is about programming, not linguistics. Jul 24, 2020 at 1:17

1 Answer 1

-1

I tried to debug this code, but found a neater version here, that definitely works for wav files: https://phon.chass.ncsu.edu/manual/save_selected.praat Remember to specify the correct destination path. Or substitute the following lines:

 #PROMPT THE USER FOR INPUT
form Please select objects and choose a path
     sentence path /home/jeff/wheremyfilesare
endform

with:

  path$ = chooseDirectory$: "Choose a directory to save all the new files in”

to activate the GUI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.