зеркало из https://github.com/mozilla/kaldi.git
trunk: Adding possibility to choose between cmn/cmvn by adding option --norm-vars, up to now the default was cmn. Similarly to $splice_opts in case that further steps rely on features from previous step, the normalization type is loaded from $srcdir/norm_vars. The scritps are backward compatible, if no value given the default is 'false'.
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@3202 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
This commit is contained in:
Родитель
b67f88bef4
Коммит
9b4a68f241
|
@ -61,14 +61,15 @@ cp $srcdir/{tree,final.mdl} $dir || exit 1;
|
|||
cp $srcdir/final.occs $dir;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -23,7 +23,6 @@ beam=10
|
|||
retry_beam=40
|
||||
boost_silence=1.0 # factor by which to boost silence during alignment.
|
||||
fmllr_update_type=full
|
||||
norm_vars=false
|
||||
# End configuration options.
|
||||
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
@ -60,7 +59,8 @@ cp $srcdir/{tree,final.mdl} $dir || exit 1;
|
|||
cp $srcdir/final.occs $dir;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "$0: feature type is $feat_type"
|
||||
|
|
|
@ -22,7 +22,6 @@ scale_opts="--transition-scale=1.0 --acoustic-scale=0.1 --self-loop-scale=0.1"
|
|||
beam=10
|
||||
retry_beam=40
|
||||
boost_silence=1.0 # factor by which to boost silence during alignment.
|
||||
norm_vars=false
|
||||
# End configuration options.
|
||||
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
@ -58,6 +57,8 @@ cp $srcdir/{tree,final.mdl} $dir || exit 1;
|
|||
cp $srcdir/final.occs $dir;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
if [[ ! -f $srcdir/final.mat || ! -f $srcdir/full.mat ]]; then
|
||||
echo "$0: we require final.mat and full.mat in the source directory $srcdir"
|
||||
|
|
|
@ -50,10 +50,12 @@ dir=$4
|
|||
oov=`cat $lang/oov.int` || exit 1;
|
||||
silphonelist=`cat $lang/phones/silence.csl` || exit 1;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
sdata=$data/split$nj
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
echo $nj > $dir/num_jobs
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
|
@ -66,8 +68,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -50,10 +50,12 @@ dir=$4
|
|||
oov=`cat $lang/oov.int` || exit 1;
|
||||
silphonelist=`cat $lang/phones/silence.csl` || exit 1;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
sdata=$data/split$nj
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
echo $nj > $dir/num_jobs
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
|
@ -66,8 +68,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -48,6 +48,9 @@ echo $nj > $dir/num_jobs
|
|||
sdata=$data/split$nj
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
cp $srcdir/{tree,final.mdl} $dir || exit 1;
|
||||
|
@ -58,8 +61,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -75,13 +75,15 @@ done
|
|||
if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "decode.sh: feature type is $feat_type";
|
||||
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
thread_string=
|
||||
[ $num_threads -gt 1 ] && thread_string="-parallel --num-threads=$num_threads"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
if [ ! -z "$transform_dir" ]; then # add transforms to features...
|
||||
|
|
|
@ -84,6 +84,7 @@ mkdir -p $dir/log
|
|||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
silphonelist=`cat $graphdir/phones/silence.csl` || exit 1;
|
||||
|
||||
|
@ -124,8 +125,8 @@ done
|
|||
if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "$0: feature type is $feat_type";
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
##
|
||||
|
|
|
@ -43,6 +43,7 @@ dir=$5
|
|||
srcdir=`dirname $dir`; # The model directory is one level up from decoding directory.
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -58,8 +59,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "decode_si.sh: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ num_threads=1 # if >1, will use gmm-latgen-faster-parallel
|
|||
parallel_opts= # If you supply num-threads, you should supply this too.
|
||||
skip_scoring=false
|
||||
scoring_opts=
|
||||
norm_vars=false
|
||||
# End configuration section
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
||||
|
@ -91,6 +90,7 @@ mkdir -p $dir/log
|
|||
split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
silphonelist=`cat $graphdir/phones/silence.csl` || exit 1;
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ mkdir -p $dir/log
|
|||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
silphonelist=`cat $graphdir/phones/silence.csl` || exit 1;
|
||||
|
||||
|
@ -142,8 +143,8 @@ done
|
|||
if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "$0: feature type is $feat_type";
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
##
|
||||
|
|
|
@ -57,6 +57,7 @@ dir=$3
|
|||
srcdir=`dirname $dir`; # The model directory is one level up from decoding directory.
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
thread_string=
|
||||
[ $num_threads -gt 1 ] && thread_string="-parallel --num-threads=$num_threads"
|
||||
|
||||
|
@ -74,8 +75,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "decode_fmmi.sh: feature type is $feat_type";
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ mkdir -p $dir/log
|
|||
|
||||
nj=`cat $olddir/num_jobs` || exit 1;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
sdata=$data/split$nj
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj >$dir/num_jobs
|
||||
|
@ -67,8 +68,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "decode_si.sh: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
||||
|
|
|
@ -73,10 +73,11 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "decode_fwdbwd.sh: feature type is $feat_type";
|
||||
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
if [ ! -z "$transform_dir" ]; then # add transforms to features...
|
||||
|
|
|
@ -62,6 +62,7 @@ done
|
|||
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
thread_string=
|
||||
[ $num_threads -gt 1 ] && thread_string="-parallel --num-threads=$num_threads"
|
||||
|
||||
|
@ -77,9 +78,9 @@ if [ -z "$feat_type" ]; then
|
|||
fi
|
||||
|
||||
case $feat_type in
|
||||
raw) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
raw) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -78,12 +78,13 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "decode.sh: feature type is $feat_type";
|
||||
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
thread_string=
|
||||
[ $num_threads -gt 1 ] && thread_string="-parallel --num-threads=$num_threads"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
if [ ! -z "$transform_dir" ]; then # add transforms to features...
|
||||
|
|
|
@ -50,7 +50,6 @@ num_threads=1 # if >1, will use gmm-latgen-faster-parallel
|
|||
parallel_opts= # If you supply num-threads, you should supply this too.
|
||||
skip_scoring=false
|
||||
scoring_opts=
|
||||
norm_vars=false
|
||||
# End configuration section
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
||||
|
@ -94,6 +93,7 @@ mkdir -p $dir/log
|
|||
split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
silphonelist=`cat $graphdir/phones/silence.csl` || exit 1;
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ done
|
|||
sdata=$data/split$nj;
|
||||
silphonelist=`cat $graphdir/phones/silence.csl` || exit 1
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
gselect_opt="--gselect=ark,s,cs:gunzip -c $dir/gselect.JOB.gz|"
|
||||
gselect_opt_1stpass="$gselect_opt copy-gselect --n=$first_pass_gselect ark:- ark:- |"
|
||||
|
||||
|
@ -79,8 +80,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -76,6 +76,7 @@ mkdir -p $dir/log
|
|||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
thread_string=
|
||||
[ $num_threads -gt 1 ] && thread_string="-parallel --num-threads=$num_threads"
|
||||
|
||||
|
@ -84,8 +85,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -70,6 +70,7 @@ nj=`cat $olddir/num_jobs` || exit 1;
|
|||
sdata=$data/split$nj;
|
||||
silphonelist=`cat $lang/phones/silence.csl` || exit 1
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
gselect_opt="--gselect=ark,s,cs:gunzip -c $dir/gselect.JOB.gz|"
|
||||
gselect_opt_1stpass="$gselect_opt copy-gselect --n=$first_pass_gselect ark:- ark:- |"
|
||||
|
||||
|
@ -87,8 +88,8 @@ if [ -z "$transform_dir" ] && [ -f $olddir/trans.1 ]; then
|
|||
fi
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -53,6 +53,7 @@ nj=`cat $olddir/num_jobs` || exit 1;
|
|||
sdata=$data/split$nj;
|
||||
gselect_opt="--gselect=ark,s,cs:gunzip -c $olddir/gselect.JOB.gz|"
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -72,8 +73,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -60,6 +60,7 @@ done
|
|||
nj=`cat $olddir/num_jobs` || exit 1;
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -108,7 +109,7 @@ cur_lats="ark:gunzip -c $olddir/lat.JOB.gz | lattice-scale --acoustic-scale=$inv
|
|||
|
||||
for model_type in left right; do
|
||||
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- |" # spliced features.
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- |" # spliced features.
|
||||
if [ ! -z "$transform_dir" ]; then # using speaker-specific transforms.
|
||||
# we want to transform in the sequence: $dir/full.mat, then the result of
|
||||
# (extend-transform-dim $transform_dir/trans.JOB), then $dir/full_inv.mat to
|
||||
|
|
|
@ -73,6 +73,7 @@ nj=`cat $olddir/num_jobs` || exit 1;
|
|||
sdata=$data/split$nj;
|
||||
silphonelist=`cat $lang/phones/silence.csl` || exit 1
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
gselect_opt="--gselect=ark,s,cs:gunzip -c $dir/gselect.JOB.gz|"
|
||||
gselect_opt_1stpass="$gselect_opt copy-gselect --n=$first_pass_gselect ark:- ark:- |"
|
||||
|
||||
|
@ -90,8 +91,8 @@ if [ -z "$transform_dir" ] && [ -f $olddir/trans.1 ]; then
|
|||
fi
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -51,6 +51,7 @@ nj=`cat $olddir/num_jobs` || exit 1;
|
|||
sdata=$data/split$nj;
|
||||
gselect_opt="--gselect=ark,s,cs:gunzip -c $olddir/gselect.JOB.gz|"
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -70,8 +71,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
|
|
@ -69,10 +69,11 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "decode.sh: feature type is $feat_type";
|
||||
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
if [ ! -z "$transform_dir" ]; then # add transforms to features...
|
||||
|
|
|
@ -42,6 +42,7 @@ sdata=$data/split$nj;
|
|||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
splice_opts=`cat $dir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
silphonelist=`cat $lang/phones/silence.csl` || exit 1;
|
||||
|
||||
|
@ -54,8 +55,8 @@ done
|
|||
if [ -f $dir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "$0: feature type is $feat_type";
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $dir/final.mat ark:- ark:- |";;
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $dir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ dir=$4
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
thread_string=
|
||||
[ $num_threads -gt 1 ] && thread_string="-parallel --num-threads=$num_threads"
|
||||
|
||||
|
@ -87,8 +88,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "align_si.sh: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -48,7 +48,6 @@ srcdir=$3
|
|||
dir=$4
|
||||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
|
|
@ -52,6 +52,7 @@ dir=$4
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
@ -85,8 +86,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "align_si.sh: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -48,6 +48,7 @@ dir=$4
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
@ -81,8 +82,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "align_si.sh: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -52,6 +52,7 @@ dir=$4
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
if [ $num_threads -gt 1 ]; then
|
||||
# the -parallel becomes part of the binary name we decode with.
|
||||
thread_string="-parallel --num-threads=$num_threads"
|
||||
|
@ -90,8 +91,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "align_si.sh: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2012 Karel Vesely
|
||||
# Johns Hopkins University (Author: Daniel Povey),
|
||||
# Copyright 2012-2013 Brno University of Technology (Author: Karel Vesely),
|
||||
#
|
||||
# Apache 2.0.
|
||||
|
||||
# This script is for use in neural network training and testing; it dumps
|
||||
# (LDA+MLLT or splice+delta) + fMLLR features in a similar format to
|
||||
# conventional raw MFCC features.
|
||||
#
|
||||
# This script dumps fMLLR features in a new data directory,
|
||||
# which is later used for neural network training/testing.
|
||||
|
||||
# Begin configuration section.
|
||||
nj=4
|
||||
cmd=run.pl
|
||||
transform_dir=
|
||||
norm_vars=false
|
||||
# End configuration section.
|
||||
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
@ -37,22 +34,15 @@ if [ $# != 5 ]; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
data=$1
|
||||
srcdata=$2
|
||||
gmmdir=$3
|
||||
logdir=$4
|
||||
feadir=$5
|
||||
|
||||
|
||||
|
||||
#srcdir=$1 -> gmmdir
|
||||
#data=$2 -> srcdata
|
||||
#dir=$3 -> ruzne
|
||||
#tgtdata=$4 -> feadir
|
||||
|
||||
sdata=$srcdata/split$nj;
|
||||
splice_opts=`cat $gmmdir/splice_opts 2>/dev/null`
|
||||
splice_opts=`cat $gmmdir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $data $logdir $feadir
|
||||
[[ -d $sdata && $srcdata/feats.scp -ot $sdata ]] || split_data.sh $srcdata $nj || exit 1;
|
||||
|
@ -73,27 +63,23 @@ esac
|
|||
if [ ! -z "$transform_dir" ]; then # add transforms to features...
|
||||
echo "Using fMLLR transforms from $transform_dir"
|
||||
[ ! -f $transform_dir/trans.1 ] && echo "Expected $transform_dir/trans.1 to exist." && exit 1
|
||||
# [ "`cat $transform_dir/num_jobs`" -ne $nj ] && \
|
||||
# echo "Mismatch in number of jobs with $transform_dir" && exit 1;
|
||||
# feats="$feats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark:$transform_dir/trans.JOB ark:- ark:- |"
|
||||
feats="$feats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk \"ark:cat $transform_dir/trans.* |\" ark:- ark:- |"
|
||||
fi
|
||||
|
||||
|
||||
#prepare the dir
|
||||
cp $srcdata/* $data; rm $data/{feats.scp,cmvn.scp};
|
||||
# prepare the dir
|
||||
cp $srcdata/* $data 2>/dev/null; rm $data/{feats,cmvn}.scp;
|
||||
|
||||
# make $bnfeadir an absolute pathname.
|
||||
feadir=`perl -e '($dir,$pwd)= @ARGV; if($dir!~m:^/:) { $dir = "$pwd/$dir"; } print $dir; ' $feadir ${PWD}`
|
||||
|
||||
name=`basename $data`
|
||||
|
||||
#forward the feats
|
||||
# forward the feats
|
||||
$cmd JOB=1:$nj $logdir/make_fmllr_feats.JOB.log \
|
||||
copy-feats "$feats" \
|
||||
ark,scp:$feadir/feats_fmllr_$name.JOB.ark,$feadir/feats_fmllr_$name.JOB.scp || exit 1;
|
||||
|
||||
#merge the feats to single SCP
|
||||
# merge the SCPs
|
||||
for n in $(seq 1 $nj); do
|
||||
cat $feadir/feats_fmllr_$name.$n.scp
|
||||
done > $data/feats.scp
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2012 Johns Hopkins University (Author: Daniel Povey)
|
||||
# Copyright 2012-2013 Brno University of Technology (Author: Karel Vesely),
|
||||
#
|
||||
# Apache 2.0
|
||||
# Decoding of fMMI or fMPE models (feature-space discriminative training).
|
||||
# If transform-dir supplied, expects e.g. fMLLR transforms in that dir.
|
||||
#
|
||||
# This script dumps fMMI features in a new data directory,
|
||||
# which is later used for neural network training/testing.
|
||||
|
||||
# Begin configuration section.
|
||||
iter=final
|
||||
|
@ -35,22 +37,15 @@ if [ $# != 5 ]; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
data=$1
|
||||
srcdata=$2
|
||||
gmmdir=$3
|
||||
logdir=$4
|
||||
feadir=$5
|
||||
|
||||
|
||||
|
||||
#srcdir=$1 -> gmmdir
|
||||
#data=$2 -> srcdata
|
||||
#dir=$3 -> ruzne
|
||||
#tgtdata=$4 -> feadir
|
||||
|
||||
sdata=$srcdata/split$nj;
|
||||
splice_opts=`cat $gmmdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $data $logdir $feadir
|
||||
[[ -d $sdata && $srcdata/feats.scp -ot $sdata ]] || split_data.sh $srcdata $nj || exit 1;
|
||||
|
@ -63,8 +58,8 @@ if [ -f $gmmdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type";
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $gmmdir/final.mat ark:- ark:- |";;
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $gmmdir/final.mat ark:- ark:- |";;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
esac
|
||||
|
||||
|
@ -81,18 +76,18 @@ $cmd JOB=1:$nj $logdir/gselect.JOB.log \
|
|||
gmm-gselect --n=$ngselect $gmmdir/$iter.fmpe "$feats" \
|
||||
"ark:|gzip -c >$feadir/gselect.JOB.gz" || exit 1;
|
||||
|
||||
#prepare the dir
|
||||
cp $srcdata/* $data; rm $data/{feats.scp,cmvn.scp};
|
||||
# prepare the dir
|
||||
cp $srcdata/* $data 2>/dev/null; rm $data/{feats,cmvn}.scp;
|
||||
|
||||
# make $bnfeadir an absolute pathname.
|
||||
feadir=`perl -e '($dir,$pwd)= @ARGV; if($dir!~m:^/:) { $dir = "$pwd/$dir"; } print $dir; ' $feadir ${PWD}`
|
||||
|
||||
#forward the feats
|
||||
# forward the feats
|
||||
$cmd JOB=1:$nj $logdir/make_fmmi_feats.JOB.log \
|
||||
fmpe-apply-transform $gmmdir/$iter.fmpe "$feats" "ark,s,cs:gunzip -c $feadir/gselect.JOB.gz|" \
|
||||
ark,scp:$feadir/feats_fmmi.JOB.ark,$feadir/feats_fmmi.JOB.scp || exit 1;
|
||||
|
||||
#merge the feats to single SCP
|
||||
# merge the feats to single SCP
|
||||
for n in $(seq 1 $nj); do
|
||||
cat $feadir/feats_fmmi.$n.scp
|
||||
done > $data/feats.scp
|
||||
|
|
|
@ -45,9 +45,11 @@ nj=`cat $srcdir/num_jobs` || exit 1;
|
|||
sdata=$data/split$nj;
|
||||
|
||||
splice_opts=`cat $srcdir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $srcdir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $srcdir/splice_opts $dir 2>/dev/null
|
||||
cp $srcdir/norm_vars $dir 2>/dev/null
|
||||
cp $srcdir/final.mat $dir
|
||||
echo $nj > $dir/num_jobs
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -60,8 +62,8 @@ if [ -f $srcdir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $srcdir/final.mat ark:- ark:- |"
|
||||
cp $srcdir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -16,6 +16,7 @@ retry_beam=40
|
|||
boost_silence=1.0 # Factor by which to boost silence likelihoods in alignment
|
||||
power=0.25 # Exponent for number of gaussians according to occurrence counts
|
||||
cluster_thresh=-1 # for build-tree control final bottom-up clustering of leaves
|
||||
norm_vars=false # false : cmn, true : cmvn
|
||||
# End configuration.
|
||||
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
@ -55,7 +56,9 @@ echo $nj > $dir/num_jobs
|
|||
sdata=$data/split$nj;
|
||||
split_data.sh $data $nj || exit 1;
|
||||
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |"
|
||||
echo $norm_vars > $dir/norm_vars # keep track of feature normalization type for decoding, alignment
|
||||
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |"
|
||||
|
||||
rm $dir/.error 2>/dev/null
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ silphonelist=`cat $lang/phones/silence.csl` || exit 1;
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
@ -60,8 +61,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -21,6 +21,7 @@ randprune=4.0 # This is approximately the ratio by which we will speed up the
|
|||
# LDA and MLLT calculations via randomized pruning.
|
||||
splice_opts=
|
||||
cluster_thresh=-1 # for build-tree control final bottom-up clustering of leaves
|
||||
norm_vars=false # false : cmn, true : cmvn
|
||||
# End configuration.
|
||||
train_tree=true # if false, don't actually train the tree.
|
||||
use_lda_mat= # If supplied, use this LDA[+MLLT] matrix.
|
||||
|
@ -63,11 +64,13 @@ echo $nj >$dir/num_jobs
|
|||
echo "$splice_opts" >$dir/splice_opts # keep track of frame-splicing options
|
||||
# so that later stages of system building can know what they were.
|
||||
|
||||
echo $norm_vars > $dir/norm_vars # keep track of feature normalization type
|
||||
# so that later stages of system building can know what they were.
|
||||
|
||||
sdata=$data/split$nj;
|
||||
split_data.sh $data $nj || exit 1;
|
||||
|
||||
|
||||
splicedfeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
splicedfeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
# Note: $feats gets overwritten later in the script.
|
||||
feats="$splicedfeats transform-feats $dir/0.mat ark:- ark:- |"
|
||||
|
||||
|
|
|
@ -56,8 +56,10 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
||||
|
@ -72,8 +74,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -75,8 +75,10 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
echo "$alidir and $denlatdir have different num-jobs" && exit 1;
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
|
||||
|
@ -85,8 +87,8 @@ echo "$0: feature type is $feat_type"
|
|||
|
||||
# Note: $feats is the features before fMPE.
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -73,8 +73,10 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
echo "$alidir and $denlatdir have different num-jobs" && exit 1;
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
|
||||
|
@ -83,8 +85,8 @@ echo "$0: feature type is $feat_type"
|
|||
|
||||
# Note: $feats is the features before fMPE.
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -50,9 +50,11 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
echo $nj > $dir/num_jobs
|
||||
|
||||
cp $alidir/tree $dir
|
||||
|
@ -66,8 +68,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -50,8 +50,10 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
||||
|
@ -66,8 +68,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -20,6 +20,7 @@ config= # name of config file.
|
|||
stage=-4
|
||||
power=0.25 # exponent to determine number of gaussians from occurrence counts
|
||||
feat_dim=-1 # This option is now ignored but retained for compatibility.
|
||||
norm_vars=false # false : cmn, true : cmvn
|
||||
# End configuration section.
|
||||
|
||||
echo "$0 $@" # Print the command line for logging
|
||||
|
@ -50,8 +51,9 @@ echo $nj > $dir/num_jobs
|
|||
sdata=$data/split$nj;
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
echo $norm_vars > $dir/norm_vars # keep track of feature normalization type for decoding, alignment
|
||||
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |"
|
||||
example_feats="`echo $feats | sed s/JOB/1/g`";
|
||||
|
||||
echo "$0: Initializing monophone system."
|
||||
|
|
|
@ -55,8 +55,10 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
||||
|
@ -70,8 +72,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -185,8 +185,9 @@ echo "Feature dim is : $feat_dim"
|
|||
|
||||
if [ ! -z "$feature_transform" ]; then
|
||||
echo "Using pre-computed feature-transform : '$feature_transform'"
|
||||
[ ! -f $feature_transform ] && echo "Missing file '$feature_transform'" && exit 1
|
||||
tmp=$dir/$(basename $feature_transform)
|
||||
cp $feature_transform $tmp; feature_transform=$tmp
|
||||
cp $feature_transform $tmp; feature_transform=$tmp
|
||||
else
|
||||
# Generate the splice transform
|
||||
echo "Using splice +/- $splice , step $splice_step"
|
||||
|
@ -298,6 +299,7 @@ else
|
|||
|
||||
#optionally prepend dbn to the initialization
|
||||
if [ ! -z $dbn ]; then
|
||||
[ ! -f $dbn ] && echo "Missing file '$dbn'" && exit 1
|
||||
mlp_init_old=$mlp_init; mlp_init=$dir/nnet_$(basename $dbn)_dnn.init
|
||||
nnet-concat $dbn $mlp_init_old $mlp_init
|
||||
fi
|
||||
|
|
|
@ -57,10 +57,12 @@ incgauss=$[($totgauss-$numgauss)/$maxiterinc] # per-iter increment for #Gauss
|
|||
nj=`cat $alidir/num_jobs` || exit 1;
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
echo $nj >$dir/num_jobs
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
## Set up features.
|
||||
|
@ -68,8 +70,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -68,11 +68,13 @@ silphonelist=`cat $lang/phones/silence.csl`
|
|||
ciphonelist=`cat $lang/phones/context_indep.csl` || exit 1;
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
phone_map_opt=
|
||||
[ ! -z "$phone_map" ] && phone_map_opt="--phone-map='$phone_map'"
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
echo $nj >$dir/num_jobs
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -84,7 +86,7 @@ if [[ ! -f $alidir/final.mat || ! -f $alidir/full.mat ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
sisplicedfeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
sisplicedfeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
sifeats="$sisplicedfeats transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
|
||||
|
||||
|
@ -109,7 +111,7 @@ else
|
|||
cur_trans_dir=$dir
|
||||
fi
|
||||
|
||||
splicedfeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$cur_trans_dir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
splicedfeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$cur_trans_dir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
|
||||
|
||||
if [ $stage -le -5 ]; then
|
||||
|
@ -219,7 +221,7 @@ while [ $x -lt $num_iters ]; do
|
|||
done
|
||||
fi
|
||||
cur_trans_dir=$dir
|
||||
splicedfeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$cur_trans_dir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
splicedfeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$cur_trans_dir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- |"
|
||||
feats="$splicedfeats transform-feats $dir/$cur_lda_iter.mat ark:- ark:- |"
|
||||
fi
|
||||
|
||||
|
|
|
@ -64,11 +64,13 @@ silphonelist=`cat $lang/phones/silence.csl`
|
|||
ciphonelist=`cat $lang/phones/context_indep.csl` || exit 1;
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
phone_map_opt=
|
||||
[ ! -z "$phone_map" ] && phone_map_opt="--phone-map='$phone_map'"
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
echo $nj >$dir/num_jobs
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -80,8 +82,8 @@ echo "$0: feature type is $feat_type"
|
|||
|
||||
## Set up speaker-independent features.
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -64,11 +64,13 @@ silphonelist=`cat $lang/phones/silence.csl`
|
|||
ciphonelist=`cat $lang/phones/context_indep.csl` || exit 1;
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
phone_map_opt=
|
||||
[ ! -z "$phone_map" ] && phone_map_opt="--phone-map='$phone_map'"
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
echo $nj >$dir/num_jobs
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -80,8 +82,8 @@ echo "$0: feature type is $feat_type"
|
|||
|
||||
## Set up speaker-independent features.
|
||||
case $feat_type in
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) sifeats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -81,7 +81,10 @@ mkdir -p $dir/log
|
|||
echo $nj > $dir/num_jobs
|
||||
sdata=$data/split$nj;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
||||
spkvecs_opt= # Empty option for now, until we estimate the speaker vectors.
|
||||
|
@ -92,8 +95,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -90,9 +90,11 @@ feat_dim=`gmm-info $alidir/final.mdl 2>/dev/null | awk '/feature dimension/{prin
|
|||
[ -z $spk_dim ] && spk_dim=$feat_dim
|
||||
nj=`cat $alidir/num_jobs` || exit 1;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
echo $nj > $dir/num_jobs
|
||||
sdata=$data/split$nj;
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -105,8 +107,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
@ -116,7 +118,7 @@ if [ -f $alidir/trans.1 ]; then
|
|||
feats="$feats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/trans.JOB ark:- ark:- |"
|
||||
elif [ -f $alidir/raw_trans.1 ]; then
|
||||
echo "$0: using raw-fMLLR transforms from $alidir"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
fi
|
||||
##
|
||||
|
||||
|
|
|
@ -94,9 +94,11 @@ feat_dim=`gmm-info $alidir/final.mdl 2>/dev/null | awk '/feature dimension/{prin
|
|||
[ -z $spk_dim ] && spk_dim=$feat_dim
|
||||
nj=`cat $alidir/num_jobs` || exit 1;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null # frame-splicing options.
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
echo $nj > $dir/num_jobs
|
||||
sdata=$data/split$nj;
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
|
@ -109,8 +111,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
@ -120,7 +122,7 @@ if [ -f $alidir/trans.1 ]; then
|
|||
feats="$feats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/trans.JOB ark:- ark:- |"
|
||||
elif [ -f $alidir/raw_trans.1 ]; then
|
||||
echo "$0: using raw-fMLLR transforms from $alidir"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
fi
|
||||
##
|
||||
|
||||
|
|
|
@ -53,8 +53,10 @@ nj=`cat $alidir/num_jobs` || exit 1;
|
|||
|
||||
sdata=$data/split$nj
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null`
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
mkdir -p $dir/log
|
||||
cp $alidir/splice_opts $dir 2>/dev/null
|
||||
cp $alidir/norm_vars $dir 2>/dev/null # cmn/cmvn option.
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
echo $nj > $dir/num_jobs
|
||||
|
||||
|
@ -68,8 +70,8 @@ if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
|||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "Invalid feature type $feat_type" && exit 1;
|
||||
|
|
|
@ -62,14 +62,15 @@ echo $nj > $dir/num_jobs
|
|||
sdata=$data/split$nj;
|
||||
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
|
||||
splice_opts=`cat $alidir/splice_opts 2>/dev/null` # frame-splicing options.
|
||||
norm_vars=`cat $alidir/norm_vars 2>/dev/null` || norm_vars=false # cmn/cmvn option, default false.
|
||||
|
||||
## Set up features.
|
||||
if [ -f $alidir/final.mat ]; then feat_type=lda; else feat_type=delta; fi
|
||||
echo "$0: feature type is $feat_type"
|
||||
|
||||
case $feat_type in
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
delta) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | add-deltas ark:- ark:- |";;
|
||||
lda) feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
cp $alidir/final.mat $dir
|
||||
;;
|
||||
*) echo "$0: invalid feature type $feat_type" && exit 1;
|
||||
|
@ -85,7 +86,7 @@ if [ -f $alidir/trans.1 ]; then
|
|||
fi
|
||||
elif [ -f $alidir/raw_trans.1 ]; then
|
||||
echo "$0: using raw-FMLLR transforms from $alidir"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
feats="ark,s,cs:apply-cmvn --norm-vars=$norm_vars --utt2spk=ark:$sdata/JOB/utt2spk scp:$sdata/JOB/cmvn.scp scp:$sdata/JOB/feats.scp ark:- | transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/raw_trans.JOB ark:- ark:- | splice-feats $splice_opts ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
|
||||
fi
|
||||
##
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ $qdir = "$dir/q";
|
|||
$qdir =~ s:/(log|LOG)/*q:/q:; # If qdir ends in .../log/q, make it just .../q.
|
||||
$queue_logfile = "$qdir/$base";
|
||||
|
||||
if (!-d $dir) { system "mkdir $dir 2>/dev/null"; } # another job may be doing this...
|
||||
if (!-d $dir) { system "mkdir -p $dir 2>/dev/null"; } # another job may be doing this...
|
||||
if (!-d $dir) { die "Cannot make the directory $dir\n"; }
|
||||
# make a directory called "q",
|
||||
# where we will put the log created by qsub... normally this doesn't contain
|
||||
|
|
Загрузка…
Ссылка в новой задаче