From 6e9f950b6626c6d81a1adbccaaf82c805089a633 Mon Sep 17 00:00:00 2001 From: Zhengyang Chen Date: Thu, 20 Jul 2023 10:53:14 +0800 Subject: [PATCH] [fix] fix vad_file argument error (#187) * [fix] fix vad_file argument error * fix error --- examples/sre/v2/run.sh | 10 +++++----- tools/make_raw_list.py | 2 +- tools/make_shard_list.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/sre/v2/run.sh b/examples/sre/v2/run.sh index 86779c43..4fcffad6 100755 --- a/examples/sre/v2/run.sh +++ b/examples/sre/v2/run.sh @@ -39,9 +39,9 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then --num_threads 16 \ --prefix shards \ --shuffle \ + --vad_file ${data}/$dset/vad \ ${data}/$dset/wav.scp ${data}/$dset/utt2spk \ - ${data}/$dset/shards ${data}/$dset/shard.list \ - ${data}/$dset/vad + ${data}/$dset/shards ${data}/$dset/shard.list done echo "Convert data for PLDA backend training and evaluation to raw format..." @@ -51,9 +51,9 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then sre_plda_data=sre_aug fi for dset in ${sre_plda_data} sre16_major sre16_eval_enroll sre16_eval_test; do - python tools/make_raw_list.py ${data}/$dset/wav.scp \ - ${data}/$dset/utt2spk ${data}/$dset/raw.list \ - ${data}/$dset/vad + python tools/make_raw_list.py --vad_file ${data}/$dset/vad \ + ${data}/$dset/wav.scp \ + ${data}/$dset/utt2spk ${data}/$dset/raw.list done # Convert all musan data to LMDB diff --git a/tools/make_raw_list.py b/tools/make_raw_list.py index 93a52a2e..f3e373ac 100644 --- a/tools/make_raw_list.py +++ b/tools/make_raw_list.py @@ -21,10 +21,10 @@ def get_args(): parser = argparse.ArgumentParser(description='') + parser.add_argument('--vad_file', type=str, help='vad file', default='non_exist') parser.add_argument('wav_file', help='wav file') parser.add_argument('utt2spk_file', help='utt2spk file') parser.add_argument('raw_list', help='output raw list file') - parser.add_argument('vad_file', help='vad file', default='non_exist') args = parser.parse_args() return args diff --git a/tools/make_shard_list.py b/tools/make_shard_list.py index 93c28ea8..e64f5274 100644 --- a/tools/make_shard_list.py +++ b/tools/make_shard_list.py @@ -148,11 +148,11 @@ def get_args(): parser.add_argument('--shuffle', action='store_true', help='whether to shuffle data') + parser.add_argument('--vad_file', type=str, help='vad file', default='non_exist') parser.add_argument('wav_file', help='wav file') parser.add_argument('utt2spk_file', help='utt2spk file') parser.add_argument('shards_dir', help='output shards dir') parser.add_argument('shards_list', help='output shards list file') - parser.add_argument('vad_file', help='vad file', default='non_exist') args = parser.parse_args() return args