2

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
0

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, privacy policy and cookie policy

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