/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash if which sox >/dev/null; then echo We have sox..continuing else echo Exiting..please install sox. exit 1 fi if which lame >/dev/null; then echo We have lame..continuing else echo Exiting..please install lame. exit 1 fi for input in *.WAV; do pcmwav=$(basename $input .WAV).wav mp3=$(basename $pcmwav .wav).mp3 sox $input -s $pcmwav lame $pcmwav $mp3 rm $input rm $pcmwav done
URL: http://techpoet.blogspot.com/2010/02/batch-convert-asterisk-wav-files-to-mp3.html