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

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

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

if [ $EXT == "wav" ] ; then
	echo -n " * Generating noise-profile..."
#	sox $1 -n trim 0 1.5 noiseprof $NAME.noise-profile
	sox $1 -n noiseprof $NAME.noise-profile
	echo -e "OK"
else
	echo "Error: need .wav"
fi