bulk convert to u-law or a-law audio format


The telephone system requires often audio prompts in u-law or a-law format.
To convert all your wav files you can execute following command in the directory with wav files,
it will convert file and save it with the same file name and new extension

# for a in *.wav; do sox "$a" -t raw -r 8000 -c 1 -e u-law ${a/.wav/.ulaw} ; done

or 

# for a in *.wav; do sox "$a" -t raw -r 8000 -c 1 -e a-law ${a/.wav/.alaw} ; done

Enjoy!

No comments:

HOWTO: Repair Logitech M325 Mouse

FixIt says that you will find single screw under CE label. It isn't always true.