-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrunVCM.sh
executable file
·44 lines (35 loc) · 1.06 KB
/
runVCM.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# usage introduction
if [ $# -ne 1 ]; then
echo "Usage: runVCM.sh <audiofile>"
exit 1;
fi
# direction of scripts and set path
export PATH=/home/${USER}/anaconda/bin:$PATH
SCRIPT=$(readlink -f $0)
BASEDIR=`dirname $SCRIPT`
cd $BASEDIR
echo $BASEDIR
# check results from Yunitator. If not, run Yunitator first to obtain yunitator_rttm_file
audio_file=$1
bn=$(basename $audio_file)
dn=$(dirname $audio_file)
yunitator_rttm_file=$dn"/yunitator_"${bn//wav/rttm} # yunicator output
if [ ! -e $yunitator_rttm_file ]; then
echo "Error: Cannot find corresponding SAD outputs. Please run yunicatator first!"
exit 1;
fi
vcm_rttm_file=$dn"/vcm_"${bn//wav/rttm} # vcm output
# # make output folder for features, below input folder
# KEEPTEMP=false
# if [ $BASH_ARGV == "--keep-temp" ]; then
# KEEPTEMP=true
# fi
# VCMTEMP=$dn/VCMtemp
# mkdir -p $VCMTEMP
# do vcm recognition
python2 ./vcm_evaluate.py ${audio_file} ${yunitator_rttm_file} ${vcm_rttm_file}
# # simply remove segmented waves and acoustic features
# if ! $KEEPTEMP; then
# rm -rf $VCMTEMP
# fi