Blame view
egs/yomdle_tamil/v1/local/augment_data.sh
1.01 KB
8dcb6dfcb first commit |
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 |
#!/bin/bash # Copyright 2018 Hossein Hadian # 2018 Ashish Arora # Apache 2.0 # This script performs data augmentation. nj=4 cmd=run.pl feat_dim=40 verticle_shift=0 echo "$0 $@" . ./cmd.sh . ./path.sh . ./utils/parse_options.sh || exit 1; srcdir=$1 outdir=$2 datadir=$3 mkdir -p $datadir/augmentations echo "copying $srcdir to $datadir/augmentations/aug1, allowed length, creating feats.scp" for set in aug1; do image/copy_data_dir.sh --spk-prefix $set- --utt-prefix $set- \ $srcdir $datadir/augmentations/$set cat $srcdir/allowed_lengths.txt > $datadir/augmentations/$set/allowed_lengths.txt local/extract_features.sh --nj $nj --cmd "$cmd" --feat-dim $feat_dim \ --vertical-shift $verticle_shift \ --fliplr false --augment 'random_scale' $datadir/augmentations/$set done echo " combine original data and data from different augmentations" utils/combine_data.sh --extra-files images.scp $outdir $srcdir $datadir/augmentations/aug1 cat $srcdir/allowed_lengths.txt > $outdir/allowed_lengths.txt |