Converting MP3/WAV to ulaw/GSM

When you want to convert typical MP3/WAV files for your PBX like Asterisk, you can use sox and lame to do it easily.


lame --decode somemp3file.mp3 output.wav

First, convert the MP3 to WAV file.

Then,
For u-law:

sox -V output.wav -r 8000 -c 1 -t ul result.ulaw

For GSM:

sox output.wav -r 8000 -c 1 result.gsm resample -ql

Pre-converting your input sound files usually give much better results than using internal modules for transcoding.

2 thoughts on “Converting MP3/WAV to ulaw/GSM”

Leave a Reply

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