Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions egs/reverb/s5/local/compute_se_scores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set -o pipefail

cmd=run.pl
nch=8
enable_pesq=false

. utils/parse_options.sh || exit 1;

Expand All @@ -22,6 +23,7 @@ if [ $# != 3 ]; then
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

Expand All @@ -30,10 +32,16 @@ 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');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/
6 changes: 5 additions & 1 deletion egs/reverb/s5/local/score_SimData.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
11c11
< clear all;
---
> function score_SimData(download_from_ldc,senhroot,pesqdir)
> function score_SimData(download_from_ldc,senhroot,pesqdir,compute_pesq)
26,27c26,27
< srmrdir = 'SRMRtoolbox-ReverbChallenge';
< % pesqdir = '/directory/where/pesq/executable/is/stored';
Expand All @@ -10,6 +10,10 @@
> addpath(genpath('SRMRToolbox/libs'));
36d35
< senhroot = '../output/SimData';
39c38
< if exist('pesqdir', 'var')
---
> if exist('pesqdir', 'var') && compute_pesq~=0
471c470,472
< fclose(fid);
\ No newline at end of file
Expand Down
9 changes: 5 additions & 4 deletions egs/reverb/s5/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ fi
stage=0
nch_se=8
# flag for turing on computation of dereverberation measures
# please make sure that you or your institution have the license to report PESQ before turning on the flag
compute_se=false
compute_se=true
# please make sure that you or your institution have the license to report PESQ before turning on the below flag
enable_pesq=false

. utils/parse_options.sh
# Set bash to 'debug' mode, it prints the commands (option '-x') and exits on :
Expand All @@ -61,7 +62,7 @@ fi

#training set and test set
train_set=tr_simu_8ch
test_sets="dt_real_1ch dt_simu_1ch et_real_1ch et_simu_1ch dt_real_2ch_beamformit dt_simu_2ch_beamformit et_real_2ch_beamformit et_simu_2ch_beamformit dt_real_8ch_beamformit dt_simu_8ch_beamformit et_real_8ch_beamformit et_simu_8ch_beamformit dt_real_1ch_wpe dt_simu_1ch_wpe et_real_1ch_wpe et_simu_1ch_wpe dt_real_2ch_wpe dt_simu_2ch_wpe et_real_2ch_wpe et_simu_2ch_wpe dt_real_8ch_wpe dt_simu_8ch_wpe et_real_8ch_wpe et_simu_8ch_wpe dt_cln et_cln"
test_sets="dt_real_8ch_beamformit dt_simu_8ch_beamformit et_real_8ch_beamformit et_simu_8ch_beamformit dt_real_1ch_wpe dt_simu_1ch_wpe et_real_1ch_wpe et_simu_1ch_wpe dt_cln et_cln"

# The language models with which to decode (tg_5k or bg_5k)
lm="tg_5k"
Expand Down Expand Up @@ -92,7 +93,7 @@ if [ $stage -le 3 ] && $compute_se; then
# download and install speech enhancement evaluation tools
local/download_se_eval_tool.sh
fi
local/compute_se_scores.sh --nch $nch_se $reverb $wavdir $pesqdir
local/compute_se_scores.sh --nch $nch_se --enable_pesq $enable_pesq $reverb $wavdir $pesqdir
cat exp/compute_se_${nch_se}ch/scores/score_SimData
cat exp/compute_se_${nch_se}ch/scores/score_RealData
fi
Expand Down