On Tue, Jan 01, 2008 at 11:27:54AM -0500, dave cantera wrote:
> vincent,
> here is a script that I used to convert a single wav file or the entire
> directory... no file specified on launch, converts all files in the current
> directory...
> creates a logfile, although trivial...
> daveC
> 
> #!/bin/sh
> #
> #    convert-all.sh
> #
> #    convert all *.wav files to .gsm .au formats
> #
> 
> if [ "null${1}" == "null" ]
> then
>     FILE_LIST=`ls *.wav`
> else
>     FILE_LIST=`ls ${1}*.wav`
> fi
> 
> LOG="./log_convert.log"
> echo "======================================================= " >>${LOG}
> echo "        started at `date`         " >>${LOG}
> 
> echo " Removing all current .gsm files..."
> rm -f *.gsm
> 

# A note from the Useless Use of ls Committee:

for FNAME in $1*.wav

> for FNAME in ${FILE_LIST}
> do
>     echo "----   -------   ----- "
>     echo "----   " >>${LOG}
>     echo " Processing ${FNAME}... "
>     echo " Processing ${FNAME}... " >>${LOG}
>     BASEFNAME=`echo ${FNAME} | awk '{print substr($0,1,length($0)-4)}'`
> 
>     echo "         making ${BASEFNAME}.gsm... "
>     echo "         making ${BASEFNAME}.gsm... " >>${LOG}
>     #sox -q -V -c 1  ${FNAME} -r 8000 -c 1 -w ${BASEFNAME}.gsm resample -ql 
> 2>>${LOG}
>     sox -q -V ${FNAME} -r 8000 -c 1 ${BASEFNAME}.gsm resample -ql  2>>${LOG}
>     echo "----   " >>${LOG}
>     echo "         making ${BASEFNAME}.au... "
>     echo "         making ${BASEFNAME}.au... " >>${LOG}
>     sox -q -V ${FNAME} -t au -r 8000 -c 1 -w ${BASEFNAME}.au resample -ql 2>>$
> {LOG}
> done

-- 
               Tzafrir Cohen
icq#16849755              jabber:[EMAIL PROTECTED]
+972-50-7952406           mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to