From f5bd371837cc3b89e6d387ecc84469a0e513fbd6 Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期三, 19 七月 2023 22:34:52 +0800
Subject: [PATCH] update
---
egs/callhome/eend_ola/run.sh | 53 ++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/egs/callhome/eend_ola/run.sh b/egs/callhome/eend_ola/run.sh
index 8936137..40fb041 100644
--- a/egs/callhome/eend_ola/run.sh
+++ b/egs/callhome/eend_ola/run.sh
@@ -27,13 +27,13 @@
exp_dir="."
input_size=345
-stage=1
-stop_stage=4
+stage=-1
+stop_stage=-1
# exp tag
-tag="exp_fix"
+tag="exp1"
-. utils/parse_options.sh || exit 1;
+. local/parse_options.sh || exit 1;
# Set bash to 'debug' mode, it will exit on :
# -e 'error', -u 'undefined variable', -o ... 'error in pipeline', -x 'print commands',
@@ -50,10 +50,25 @@
simu_allspkr_chunk2000_model_dir="baseline_$(basename "${simu_allspkr_chunk2000_diar_config}" .yaml)_${tag}"
callhome_model_dir="baseline_$(basename "${callhome_diar_config}" .yaml)_${tag}"
-# Prepare data for training and inference
-if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
- echo "stage 0: Prepare data for training and inference"
+# simulate mixture data for training and inference
+if [ ${stage} -le -1 ] && [ ${stop_stage} -ge -1 ]; then
+ echo "stage -1: Simulate mixture data for training and inference"
+ echo "The detail can be found in https://github.com/hitachi-speech/EEND"
+ echo "Before running this step, you should download and compile kaldi and set KALDI_ROOT in this script and path.sh"
+ echo "This stage may take a long time, please waiting..."
+ KALDI_ROOT=
+ ln -s $KALDI_ROOT/egs/wsj/s5/steps steps
+ ln -s $KALDI_ROOT/egs/wsj/s5/utils utils
+ local/run_prepare_shared_eda.sh
fi
+
+## Prepare data for training and inference
+#if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
+# echo "stage 0: Prepare data for training and inference"
+# echo "The detail can be found in https://github.com/hitachi-speech/EEND"
+# . ./local/
+#fi
+#
# Training on simulated two-speaker data
world_size=$gpu_num
@@ -230,13 +245,17 @@
python local/model_averaging.py ${exp_dir}/exp/${callhome_model_dir}/$callhome_ave_id.pb $models
fi
-## inference
-#if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
-# echo "Inference"
-# mkdir -p ${exp_dir}/exp/${callhome_model_dir}/inference/log
-# CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES python local/infer.py \
-# --config_file ${exp_dir}/exp/${callhome_model_dir}/config.yaml \
-# --model_file ${exp_dir}/exp/${callhome_model_dir}/$callhome_ave_id.pb \
-# --output_rttm_file ${exp_dir}/exp/${callhome_model_dir}/inference/rttm \
-# --wav_scp_file ${callhome_feats_dir_chunk2000}/${callhome_valid_dataset}/${callhome2_wav_scp_file} 1> ${exp_dir}/exp/${callhome_model_dir}/inference/log/infer.log 2>&1
-#fi
\ No newline at end of file
+# inference and compute DER
+if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
+ echo "Inference"
+ mkdir -p ${exp_dir}/exp/${callhome_model_dir}/inference/log
+ CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES python local/infer.py \
+ --config_file ${exp_dir}/exp/${callhome_model_dir}/config.yaml \
+ --model_file ${exp_dir}/exp/${callhome_model_dir}/$callhome_ave_id.pb \
+ --output_rttm_file ${exp_dir}/exp/${callhome_model_dir}/inference/rttm \
+ --wav_scp_file ${callhome_feats_dir_chunk2000}/${callhome_valid_dataset}/${callhome2_wav_scp_file} \
+ 1> ${exp_dir}/exp/${callhome_model_dir}/inference/log/infer.log 2>&1
+ md-eval.pl -c 0.25 \
+ -r ${callhome_feats_dir_chunk2000}/${callhome_valid_dataset}/rttm \
+ -s ${exp_dir}/exp/${callhome_model_dir}/inference/rttm > ${exp_dir}/exp/${callhome_model_dir}/inference/result_med11_collar0.25 2>/dev/null || exit
+fi
\ No newline at end of file
--
Gitblit v1.9.1