#!/bin/sh ORIG=$1 if [ "$ORIG" == "" ]; then echo "use: $0 <mp3name>" > /dev/stderr exit -1 fi TO=${ORIG%%.gsm} sox $ORIG -c1 -r 8000 -t al $TO.alaw sox $ORIG -c1 -r 8000 -t ul $TO.ulaw sox $ORIG -c1 -r 8000 -w -s -t wav $TO.wav sox $ORIG -c1 -r 8000 -w -s -t raw $TO.sln echo $ORIG speexenc --vbr --comp 10 $TO.wav $TO.speex