This script does mp3-> wav -> gsm, if you omit the first part it should work for you. requires mpg123 and sox for wav->gsm conversion and mp3-decoder to start from mp3.
will process all .mp3 files in the current directory.. #!/bin/sh for i in *.mp3; do file=`echo $i | sed -e s/\.mp3$//g` mp3-decoder -w "$file.wav" "$i" normalize-audio "$file.wav" sox "$file.wav" -r 8000 "decafbad-$file.gsm" rm "$file.wav" done for ease will do wav->gsm for your pleasure.. #!/bin/sh for i in *.wav; do file=`echo $i | sed -e s/\.wav$//g` normalize-audio "$i" sox "$i" -r 8000 "$file.gsm" done On Wed, 2005-04-06 at 21:39 -0700, beonice wrote: > Hi, all. > > We needed to add a few custom menus to the IVR, so got > some recordings done professionally over the past > week. Now, the files (very good sound quality) have > been delivered to us, in .wav format. From googling at > the digium site, I'm seeing that people in the past > have successfully used wav files for IVRs. > > I've tried sticking them into the > /var/libs/asterisk/sounds directory (after removing > corresponding .gsm files where necessary). However, if > I leave the extension as .wav (the format it came to > me in), then I get the error message: > ast_streamfile: Unable to open test-welcome (format > ulaw): No such file or directory > > > and if I just change the extension to .WAV, I get the > message: > ast_streamfile failed on > IAX2/[EMAIL PROTECTED]:4569/5 for > test-welcome > > Any ideas what I'm doing wrong? It looks like (from > the messages above) the .WAV is the preferred format, > but it's obviously not working. > > Help! > > Thanks, > Maya > > > > > __________________________________ > Yahoo! Messenger > Show us what our next emoticon should look like. Join the fun. > http://www.advision.webevents.yahoo.com/emoticontest > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users -- Trixter http://www.0xdecafbad.com
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users