Blame view
egs/reverb/s5/local/compute_se_scores.sh
1.67 KB
8dcb6dfcb first commit |
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 47 |
#!/bin/bash # Copyright 2018 Johns Hopkins University (Author: Aswin Shanmugam Subramanian) # Apache 2.0 # This script computes the dereverberation scores given in REVERB challenge # Eg. local/compute_se_scores.sh --nch 8 /export/corpora5/REVERB_2014/REVERB ${PWD}/wav ${PWD}/local . ./cmd.sh . ./path.sh set -e set -u set -o pipefail cmd=run.pl nch=8 enable_pesq=false . utils/parse_options.sh || exit 1; if [ $# != 3 ]; then echo "Wrong #arguments ($#, expected 3)" echo "Usage: local/compute_se.sh [options] <reverb_data> <enhancement-directory> <pesq-directory>" echo "options" echo " --cmd <cmd> # Command to run in parallel with" echo " --nch <nch> # nch of WPE to use for computing SE scores" echo " --enable_pesq <enable_pesq> # Boolean flag to enable PESQ" exit 1; fi reverb_data=$1 enhancement_directory=$2 pesqdir=$3 enhancement_directory_sim=$enhancement_directory/WPE/${nch}ch/REVERB_WSJCAM0_dt/data/ enhancement_directory_real=$enhancement_directory/WPE/${nch}ch/MC_WSJ_AV_Dev/ expdir=${PWD}/exp/compute_se_${nch}ch if $enable_pesq; then compute_pesq=1 else compute_pesq=0 fi pushd local/REVERB_scores_source/REVERB-SPEENHA.Release04Oct/evaltools $cmd $expdir/compute_se_real.log matlab -nodisplay -nosplash -r "addpath('SRMRToolbox'); score_RealData('$reverb_data','$enhancement_directory_real');exit" $cmd $expdir/compute_se_sim.log matlab -nodisplay -nosplash -r "addpath('SRMRToolbox'); score_SimData('$reverb_data','$enhancement_directory_sim','$pesqdir',$compute_pesq);exit" popd rm -rf $expdir/scores mv local/REVERB_scores_source/REVERB-SPEENHA.Release04Oct/scores $expdir/ |