1. Override the default bit rate:

sox myfile.wav -C 192 myfile.mp3

converts myfile.wav to myfile.mp3 with a user-specified bit rate (here, 192 Kbps). Further options that can be passed to the LAME encoder (encoding performance, VBR) are described here:

2. Convert all wav files in a directory to mp3 with a shell command:

for a in *.wav; do sox "$a" -C 192 "$a".mp3; done

Leave a Reply

Your email address will not be published. Required fields are marked *