-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_vad.sh
executable file
·48 lines (31 loc) · 1.28 KB
/
run_vad.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
43
44
45
46
#!/bin/bash
#SBATCH -A [email protected]
#SBATCH -J VADtest
#SBATCH -o vad_out.txt
#SBATCH -e vad_err.txt
#SBATCH -p gpu-all
#SBATCH --gres gpu:0
#SBATCH -c 40 #number of CPUs needed
module load cuda10.1/toolkit gcc6 slurm cmake
source ~/anaconda3/bin/activate ~/anaconda3/envs/vad
#pip install -r ./requirements.txt --ignore-installed
SLURM_SUBMIT_DIR="/alt/asr/shchowdhury/vad/vad_simple_pipeline"
WORK_PATH="/alt/asr/shchowdhury/vad/vad_simple_pipeline"
in=$1
out=$2
THRESHOLD=$3
TASK_ID="VAD_TEST_1"
INPUT_FOLDER=$WORK_PATH"/"$in
OUTPUT_FOLDER=$WORK_PATH"/"$out #data_out_merged/"
SMOOTHING_FACTOR=1.0 #smooth window (in seconds)
WEIGHT_FACTOR=0.4 #weight factor (0 < weight < 1) :the higher, the more strict
#MODEL_FILE=
VAD=1
mkdir -p $OUTPUT_FOLDER
if [ $THRESHOLD -eq 0 ]; then
python src/vad_simple.py VAD_simple -i $INPUT_FOLDER -o $OUTPUT_FOLDER --smoothing $SMOOTHING_FACTOR --weight $WEIGHT_FACTOR --classifier /alt/asr/shchowdhury/vad/vad_simple_pipeline/models/svm_rbf_sm
echo "Done Spliting"
else
python src/vad_simple.py VAD_simple_merged -i $INPUT_FOLDER -o $OUTPUT_FOLDER --smoothing $SMOOTHING_FACTOR --weight $WEIGHT_FACTOR --classifier /alt/asr/shchowdhury/vad/vad_simple_pipeline/models/svm_rbf_sm -t $THRESHOLD
echo "Done Spliting and Merged by Threshold"
fi