From 16c834bcf8c5d0c891f25b307f0241c1383943de Mon Sep 17 00:00:00 2001
From: 志浩 <neo.dzh@alibaba-inc.com>
Date: 星期二, 01 八月 2023 20:53:55 +0800
Subject: [PATCH] TOLD/SOND: update finetune.sh

---
 egs/callhome/diarization/sond/finetune.sh                           |   18 +++++++++++-------
 egs/callhome/diarization/sond/script/extract_nonoverlap_segments.py |    2 +-
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/egs/callhome/diarization/sond/finetune.sh b/egs/callhome/diarization/sond/finetune.sh
index e82dcae..6978343 100644
--- a/egs/callhome/diarization/sond/finetune.sh
+++ b/egs/callhome/diarization/sond/finetune.sh
@@ -221,13 +221,17 @@
   done
 fi
 
-
-# You will get a DER like:
-# iter0: 9.68 10.51
-# iter1:
-# iter2:
-# iter3:
-# iter4:
+# In this stage, we need the raw waveform files of Callhome corpus.
+# Due to the data license, we can't provide them, please get them additionally.
+# And convert the sph files to wav files (use scripts/dump_pipe_wav.py).
+# Then find the wav files to construct wav.scp and put it at data/callhome2/wav.scp.
+# After iteratively perform SOAP, you will get DER results like:
+# iters| oracle_vad  |  system_vad
+# iter_0:   9.68      |     10.51
+# iter_1:   9.26      |     10.14  (reported in the paper)
+# iter_2:   9.18      |     10.08
+# iter_3:   9.24      |     10.15
+# iter_4:   9.27      |     10.17
 if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
   for dset in ${test_sets}; do
     echo "stage 4: Evaluating finetuned system on ${dset} set with medfilter_size=83 clustering=EEND-OLA"
diff --git a/egs/callhome/diarization/sond/script/extract_nonoverlap_segments.py b/egs/callhome/diarization/sond/script/extract_nonoverlap_segments.py
index a4e43a2..37f995a 100644
--- a/egs/callhome/diarization/sond/script/extract_nonoverlap_segments.py
+++ b/egs/callhome/diarization/sond/script/extract_nonoverlap_segments.py
@@ -93,7 +93,7 @@
         extracted_spk = []
         count = 1
         for st, ed, spk in tqdm(turns, total=len(turns), ascii=True, disable=args.no_pbar):
-            if (ed - st) >= args.min_dur * args.sr and wav[st: ed] >= args.min_dur * args.sr:
+            if (ed - st) >= args.min_dur * args.sr and len(wav[st: ed]) >= args.min_dur * args.sr:
                 seg = wav[st: ed]
                 save_path = os.path.join(args.out_dir, mid, spk, "{}_U{:04d}.wav".format(spk, count))
                 if not os.path.exists(os.path.dirname(save_path)):

--
Gitblit v1.9.1