On Fri, Apr 25, 2008 at 3:09 PM, Peter Plessas <plessas(a)mur.at> 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.
Thanks for any hints,
Peter
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user(a)lists.linuxaudio.org
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
this is a script I call 0db
-----------------------------------------------------------------------------------------------------------
#!/bin/sh
if [ $# -eq 1 ]; then {
o=`echo $1 | sed -e 's/\([^\.]*\)\(\.\)\(.*\)/\1_normalized.\3/'`
}; else {
o=$2
}; fi
sox -v $(sox $1 -n stat 2>&1 | grep Volume | sed -e 's/[^0-9]*\(.*\)/\1/')
$1 $o
-------------------------------------------------------------------------------------------------------------
If you drag file.wav to its icon, it will create file_normalized.wav,
if you call it on the command line with one argument, it has the same
behaviour. If you call from the command line like so: '0db file.wav
new.wav' it will create new.wav, as you would expect.