[LAU] Normalize from command line?

Ken Restivo ken at restivo.org
Sat Apr 26 01:37:41 EDT 2008


On Sat, Apr 26, 2008 at 12:09:57AM +0200, Peter Plessas wrote:
> Dear List,
> 
> does anyone know of an application (or script) to normalize audio-files 
> from the command line? I have only come across "normalize-audio" which 
> does compression across multiple files, but i haven't figured out how to 
> raise the amplitude of a file to +/-1 without altering it's dynamics. I 
> am sure this could be done using a two-pass sox script, but before i 
> start writing my own, i wanted to know if a similar solution already exists.
> 

This is probably not the best way to do it, but it's worked for me:

for i in `ls *wav`; do 
	FOO=`sox $i -e stat -v 2>&1`
	BN=`basename $i .wav`
	echo "norming $i with factor $FOO ..."
	sox -v $FOO $i -t wav ${BN}.norm.wav
done



More information about the Linux-audio-user mailing list