Converting MP3 files to wav for Asterisk

Home » Asterisk Users » Converting MP3 files to wav for Asterisk
Asterisk Users No Comments

Try to convert into gsm instead wav.

sox test.wav -r 8000 -c1 test.gsm

Am 03.03.2011 06:20, schrieb Timothy Smith:
> Hi,
>
> I am running a service where I play full songs but MP3 files kept on
> crashing my server. I resorted to wav but the quality is really poor
> after converting..or even sometimes not audible at all! Do you guys
> know of a better way I can convert mp3 to wav and restore quality?
> Below is the script I am using, I also tried the steps at
> http://www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk
> but it wasnt any better.
>
> —————————-
> #!/bin/bash
> for i in `ls $1/*mp3`
> do
> lame -a $i $i.wav
> mplayer -quiet -vo null -vc dummy -ao pcm:waveheader:file=”$i.h.wav” $i.wav
> sox $i.h.wav -t raw -r 8000 -s -2 -c 1 `echo $i|sed “s/.mp3/.sln/”`
> done
> —————————–
>
> Any thoughts please?
>
> Regards,
> Tim
>
> —
> _____________________________________________________________________
> — Bandwidth and Colocation Provided by http://www.api-digital.com
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>