convert wav files to gsm for use with asterisk / convert many mp3 to gsm
Submitted by byo71 on Fri, 2007-04-06 23:22.
Asterisk Programming | Communications
I have to use this all the time to convert my wav files to gsm for use in asterisk.
sox foo.wav -r 8000 -c1 foo.gsm resample -ql
make sure you have sox installed
# apt-get install sox
-------------------------------------------------
CONVERT *.MP3 to *.GSM
for I in $(ls -1 *.mp3)
do
NAME=$I
echo "Converting from mp3.wav"
mpg123 -w "$NAME.wav" "$NAME"
echo "Converting from wav to gsm"
sox -t wav "$NAME.wav" -r 8000 -c1 -t gsm "$NAME.gsm" resample -ql
echo "output filename: $NAME.gsm"
done
Not sure if this works when there are spaces in the file names...


Recent comments
37 weeks 6 days ago
48 weeks 20 hours ago
48 weeks 21 hours ago
1 year 1 week ago
1 year 7 weeks ago
1 year 9 weeks ago
1 year 22 weeks ago
1 year 22 weeks ago
1 year 22 weeks ago
1 year 37 weeks ago