-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathprep_eg_dir.sh
executable file
·54 lines (50 loc) · 1.41 KB
/
prep_eg_dir.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Prepare the ``egs/dihard_2018/v2`` directory for experiments.
THIS_DIR=`realpath $(dirname "$0")`
DATA_DIR=$THIS_DIR/../data
KALDI_DIR=$THIS_DIR/../tools/kaldi
SCRIPTS_DIR=$THIS_DIR/../scripts
DIHARD_EG_DIR=$KALDI_DIR/egs/dihard_2018/v2
if [ -f $KALDI_DIR ]; then
echo "$KALDI_DIR not found. Please run ``tools/install_kaldi.sh``"
exit 1
fi
if [ -f $DIHARD_EG_DIR ]; then
"$DIHARD_EG_DIR not found. Please run ``tools/install_kaldi.sh``"
exit 1
fi
BNS="alltracksrun.sh md_eval.pl"
for bn in $BNS; do
src_path=$SCRIPTS_DIR/$bn
dest_path=$DIHARD_EG_DIR/$bn
if [ ! -f $dest_path ]; then
cp $src_path $dest_path
fi
done
BNS="beamformit.cfg"
CONF_DIR=$DIHARD_EG_DIR/conf
for bn in $BNS; do
src_path=$DATA_DIR/$bn
dest_path=$CONF_DIR/$bn
if [ ! -f $dest_path ]; then
cp $src_path $dest_path
fi
done
BNS="flac_to_wav.sh make_data_dir.py run_beamformit.sh run_denoising.sh run_vad.sh split_rttm.py"
for bn in $BNS; do
src_path=$SCRIPTS_DIR/$bn
dest_path=$DIHARD_EG_DIR/local/$bn
if [ ! -f $dest_path ]; then
cp $src_path $dest_path
fi
done
XVEC_DIR=$DIHARD_EG_DIR/exp/xvector_nnet_1a
mkdir -p $XVEC_DIR
BNS="final.raw max_chunk_size min_chunk_size extract.config plda_track1 plda_track2 plda_track3 plda_track4"
for bn in $BNS; do
src_path=$DATA_DIR/$bn
dest_path=$XVEC_DIR/$bn
if [ ! -f $dest_path ]; then
cp $src_path $dest_path
fi
done