Im using openSMILE software to extract features from an audio file. My work involves extracting mfcc featues from a .WAV file (to obtain a .mfcc file).

Default code to convert the file is as follows:

./SMILExtract -C config/MFCC12_E_D_A.conf -I input.wav -O output.mfcc.htk

this step involves converting one file at a time.

Is there a way to convert all the files in a folder simultaneously?

I have to convert some 2500 files. Please help.


Please try the following command in your terminal:

for f in $(ls -1 *.wav);do SMILExtract -C config/MFCC12_E_D_A.conf -I $f -O $f.mfcc.htk ; done;

You can see more looping constructs in this bash manual.

| improve this answer | |
  • its showing that it is unable to open the.wav file which isnt even in the folder – user299099 Jul 1 '14 at 4:56
  • You should adapt your paths. The general patern is for each file that comes from ls -1 your-path_/*.wav;do _your-command ;done; – tuxar Jul 1 '14 at 11:41

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.