summaryrefslogtreecommitdiffstats
path: root/tools/audio_remove_noise
blob: 05c9a5f0864b6474f51a06f28f7acbdeaf63af22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

EXT=`echo "$1"|awk -F . '{print $NF}'`
NAME=`basename $1 .$EXT`

NOISE="0.1"

if [ -z "$1" ]; then
	echo "Usage: $0 <wav-file> [<noise-profile-file>]"
	exit 1
fi

echo -n " * Removing noise with $NOISE..."
mv $1 $NAME-old.$EXT
sox $NAME-old.$EXT $NAME.wav noisered $NAME.noise-profile $NOISE 2> /dev/null
echo -e "OK!"