Skip to content

Commit

Permalink
[fix] fix vad_file argument error (#187)
Browse files Browse the repository at this point in the history
* [fix] fix vad_file argument error

* fix error
  • Loading branch information
czy97 authored Jul 20, 2023
1 parent 0473c9c commit 6e9f950
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions examples/sre/v2/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/make_raw_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tools/make_shard_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6e9f950

Please sign in to comment.