Tuesday, August 5, 2008

How to Convert wav file to ulaw for asterisk

To convert wav to ulaw:

sox -V vm-intro.wav -r 8000 -c 1 -t ul -w vm-intro.ulaw

To convert ulaw(gsm) to MP3:
sox /var/lib/asterisk/sounds/mymessage.gsm -r 8000 -c 1 -s -w /var/lib/asterisk/sounds/mymessage.wav

lame -V3 /var/lib/asterisk/sounds/mymessage.wav /var/lib/asterisk/sounds/mymessage.mp3

I think this is the only way to convert your recorded ulaw(gsm) file into MP3.

AddThis Feed Button