[Asterisk-Users] Re: IVR GSM voice prompt quality

Steven Critchfield critch at basesys.com
Tue Apr 27 20:13:54 MST 2004


On Tue, 2004-04-27 at 21:05, John Todd wrote:
> Here is the ugly hack I use for conversion:
> 
> #!/bin/sh
> 
> for file in *.aif
>   do
>          sox ${file} -r 8000 -c 1 `echo $file|cut -f 1 -d "."`.gsm
>   done

While I know this isn't a *nix list any more than necessary for
supporting the software, but here is a bit of alternation for your
example.

for file in *.aif
  do
    sox ${file} -r 8000 -c 1 `basename $file .aiff`.gsm
  done

basename basically works like echo and will cut off whatever you put as
the 2nd argument. It is slightly shorter to type, and fewer command
switches to remember.

-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list