rate: add some sanity checking
[sox.git] / scripts / voice-cleanup.sh
blob05136dd873879ba37b515165f51ca81dfb5597e3
1 #!/bin/sh
3 # This script, as used at http://language101.com, shows using several
4 # effects in combination to normalise and trim voice recordings that
5 # may have been recorded using different microphones, with differing
6 # background noise etc.
8 SOX=../src/sox
10 if [ $# -lt 2 ]; then
11 echo "Usage: $0 infile outfile"
12 exit 1
15 $SOX "$1" "$2" \
16 remix - \
17 highpass 100 \
18 norm \
19 compand 0.05,0.2 6:-54,-90,-36,-36,-24,-24,0,-12 0 -90 0.1 \
20 vad -T 0.6 -p 0.2 -t 5 \
21 fade 0.1 \
22 reverse \
23 vad -T 0.6 -p 0.2 -t 5 \
24 fade 0.1 \
25 reverse \
26 norm -0.5