Quickly Encode Audio Files For Asterisk Music On Hold Using Sox

To quickly encode audio files for asterisk music on hold using sox, switch to the directory containing your original audio files and encode to 16-bit 16KHz mono, like so:

ls -1 | while read LINE; do echo "${LINE}"; sox "${LINE}" -b 16 -r 16000 -c 1 "${LINE}.wav"; done;

Leave a Reply