Skip to content
Snippets Groups Projects
Commit dd957295 authored by Dan Povey's avatar Dan Povey
Browse files

Worked on (but not yet tested) train_{ubm,sgmm}.sh in s5.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@908 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 6fdad62a
No related branches found
No related tags found
No related merge requests found
......@@ -11,22 +11,22 @@
# Begin configuration section.
nj=4
cmd=scripts/run.pl
stage=-5
cmd=run.pl
stage=-6
context_opts= # e.g. set it to "--context-width=5 --central-position=2" for a
# quinphone system.
scale_opts="--transition-scale=1.0 --acoustic-scale=0.1 --self-loop-scale=0.1"
num_iters=25 # Total number of iterations
num_iters_alimdl=3 # Number of iterations for estimating alignment model.
maxiterinc=15 # Last iter to increase #substates on.
max_iter_inc=15 # Last iter to increase #substates on.
realign_iters="5 10 15"; # Iters to realign on.
spkvec_iters="5 8 12 17" # Iters to estimate speaker vectors on.
add_dim_iters="6 8 10 12"; # Iters on which to increase phn dim and/or spk dim,
rand_prune=0.1 # Randomized-pruning parameter for posteriors, to speed up training.
phn_dim= # You can use this to set the phonetic subspace dim. [default: feat-dim+1]
spk_dim= # You can use this to set the speaker subspace dim. [default: feat-dim]
beam=8
retry_beam=40
# End configuration section.
if [ -f path.sh ]; then . ./path.sh; fi
......@@ -34,7 +34,7 @@ if [ -f path.sh ]; then . ./path.sh; fi
if [ $# != 7 ]; then
echo "Usage: steps/train_sgmm.sh <num-leaves> <num-substates> <data> <lang> <ali-dir> <ubm-dir> <exp-dir>"
echo "Usage: steps/train_sgmm.sh <num-leaves> <num-substates> <data> <lang> <ali-dir> <ubm> <exp-dir>"
echo " e.g.: steps/train_sgmm.sh 3500 10000 data/train_si84 data/lang \\"
echo " exp/tri3b_ali_si84 exp/ubm4a/final.ubm exp/sgmm4a"
echo "main options (for others, see top of script file)"
......@@ -55,19 +55,16 @@ ubm=$6
dir=$7
# Check some files.
for f in $data/feats.scp $lang/L.fst $alidir/ali.1.gz $alidir/final.mdl $ubm/final.ubm; do
for f in $data/feats.scp $lang/L.fst $alidir/ali.1.gz $alidir/final.mdl $ubm; do
[ ! -f $f ] && echo "$0: no such file $f" && exit 1;
done
cp $transform_dir/final.mat $dir/final.mat || exit 1;
# Set some variables.
oov=`cat $lang/oov.int`
silphonelist=`cat $lang/phones/silence.csl`
numsubstates=$num_leaves # Initial #-substates.
incsubstates=$[($totsubstates-$numsubstates)/$maxiterinc] # per-iter increment for #substates
incsubstates=$[($totsubstates-$numsubstates)/$max_iter_inc] # per-iter increment for #substates
feat_dim=`gmm-info $alidir/final.model | awk '/feature dimension/{print $NF}'` || exit 1;
[ $feat_dim -eq $feat_dim ] || exit 1; # make sure it's numeric.
[ -z $phn_dim ] && phn_dim=$[$feat_dim+1]
......@@ -79,233 +76,191 @@ echo $nj > $dir/num_jobs
sdata=$data/split$nj;
[[ -d $sdata && $data/feats.scp -ot $sdata ]] || split_data.sh $data $nj || exit 1;
for n in `get_splits.pl $nj`; do
# Initially don't have speaker vectors, but change this after we estimate them.
spkvecs_opt[$n]=
gselect_opt[$n]="--gselect=ark,s,cs:gunzip -c $dir/$n.gselect.gz|"
done
n1=`get_splits.pl $nj | awk '{print $1}'`
[ -f $transform_dir/$n1.trans ] && echo "Using speaker transforms from $transform_dir"
for n in `get_splits.pl $nj`; do
featspart[$n]="ark,s,cs:apply-cmvn --norm-vars=false --utt2spk=ark:$data/split$nj/$n/utt2spk ark:$transform_dir/$n.cmvn scp:$data/split$nj/$n/feats.scp ark:- | splice-feats ark:- ark:- | transform-feats $dir/final.mat ark:- ark:- |"
if [ -f $transform_dir/$n1.trans ]; then
featspart[$n]="${featspart[$n]} transform-feats --utt2spk=ark:$data/split$nj/$n/utt2spk ark:$transform_dir/$n.trans ark:- ark:- |"
fi
done
if [ ! -f $ubm ]; then
echo "No UBM in $ubm"
exit 1;
spkvecs_opt= # Empty option for now, until we estimate the speaker vectors.
gselect_opt="--gselect=ark,s,cs:gunzip -c $dir/gselect.JOB.gz|"
## 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 ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
cp $alidir/final.mat $dir
;;
*) echo "$0: invalid feature type $feat_type" && exit 1;
esac
if [ -f $alidir/1.trans ]; then
echo "$0: using transforms from $alidir"
feats="$feats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/JOB.trans ark:- ark:- |"
fi
##
if [ $stage -le -5 ]; then
# This stage assumes we won't need the context of silence, which
# assumes something about $lang/roots.txt, but it seems pretty safe.
echo "Accumulating tree stats"
rm $dir/.error 2>/dev/null
for n in `get_splits.pl $nj`; do
$cmd $dir/log/acc_tree.$n.log \
acc-tree-stats $context_opts --ci-phones=$silphonelist $alidir/final.mdl "${featspart[$n]}" \
"ark:gunzip -c $alidir/$n.ali.gz|" $dir/$n.treeacc || touch $dir/.error &
done
wait
[ -f $dir/.error ] && echo Error accumulating tree stats && exit 1;
if [ $stage -le -6 ]; then
echo "$0: accumulating tree stats"
$cmd JOB=1:$nj $dir/log/acc_tree.JOB.log \
acc-tree-stats --ci-phones=$ciphonelist $alidir/final.mdl "$feats" \
"ark:gunzip -c $alidir/ali.JOB.gz|" $dir/JOB.treeacc || exit 1;
[ "`ls $dir/*.treeacc | wc -w`" -ne "$nj" ] && echo "$0: Wrong #tree-stats" && exit 1;
sum-tree-stats $dir/treeacc $dir/*.treeacc 2>$dir/log/sum_tree_acc.log || exit 1;
rm $dir/*.treeacc
fi
if [ $stage -le -4 ]; then
echo "Computing questions for tree clustering"
if [ $stage -le -5 ]; then
echo "$0: Getting questions for tree clustering."
# preparing questions, roots file...
sym2int.pl $lang/phones.txt $lang/phonesets_cluster.txt > $dir/phonesets.txt || exit 1;
cluster-phones $context_opts $dir/treeacc $dir/phonesets.txt $dir/questions.txt 2> $dir/log/questions.log || exit 1;
sym2int.pl $lang/phones.txt $lang/extra_questions.txt >> $dir/questions.txt
compile-questions $context_opts $lang/topo $dir/questions.txt $dir/questions.qst 2>$dir/log/compile_questions.log || exit 1;
sym2int.pl --ignore-oov $lang/phones.txt $lang/roots.txt > $dir/roots.txt
echo "Building tree"
$cmd $dir/log/train_tree.log \
build-tree $context_opts --verbose=1 --max-leaves=$num_leaves \
$dir/treeacc $dir/roots.txt \
$dir/questions.qst $lang/topo $dir/tree || exit 1;
# The next line is a bit of a hack to work out the feature dim. The program
# feat-to-len returns the #rows of each matrix, which for the transform matrix,
# is the feature dim.
featdim=`feat-to-len "scp:echo foo $transform_dir/final.mat|" ark,t:- 2>/dev/null | awk '{print $2}'`
# Note: if phn_dim and/or spk_dim are higher than you can initialize with,
# sgmm-init will just make them as high as it can (later we'll increase)
cluster-phones $dir/treeacc $lang/phones/sets.int $dir/questions.int 2> $dir/log/questions.log || exit 1;
cat $lang/phones/extra_questions.int >> $dir/questions.int
compile-questions $lang/topo $dir/questions.int $dir/questions.qst 2>$dir/log/compile_questions.log || exit 1;
echo "$0: Building the tree"
$cmd $dir/log/build_tree.log \
build-tree --verbose=1 --max-leaves=$numleaves \
$dir/treeacc $lang/phones/roots.int \
$dir/questions.qst $lang/topo $dir/tree || exit 1;
fi
if [ $stage -le -4 ]; then
echo "$0: Initializing the model"
# Note: if phn_dim > feat_dim+1 or spk_dim > feat_dim, these dims
# will be truncated on initialization.
$cmd $dir/log/init_sgmm.log \
sgmm-init --phn-space-dim=$phn_dim --spk-space-dim=$spk_dim $lang/topo $dir/tree $ubm \
$dir/0.mdl || exit 1;
sgmm-init --phn-space-dim=$phn_dim --spk-space-dim=$spk_dim $lang/topo \
$dir/tree $ubm $dir/0.mdl || exit 1;
fi
rm $dir/.error 2>/dev/null
if [ $stage -le -3 ]; then
echo "Doing Gaussian selection"
for n in `get_splits.pl $nj`; do
$cmd $dir/log/gselect$n.log \
sgmm-gselect $dir/0.mdl "${featspart[$n]}" "ark,t:|gzip -c > $dir/$n.gselect.gz" \
|| touch $dir/.error &
done
wait;
[ -f $dir/.error ] && echo "Error doing Gaussian selection" && exit 1;
echo "$0: doing Gaussian selection"
$cmd JOB=1:$nj $dir/log/gselect.JOB.log \
sgmm-gselect $dir/0.mdl "$feats" \
"ark,t:|gzip -c >$dir/gselect.JOB.gz" || exit 1;
fi
if [ $stage -le -2 ]; then
echo "Compiling training graphs"
for n in `get_splits.pl $nj`; do
$cmd $dir/log/compile_graphs$n.log \
compile-train-graphs $dir/tree $dir/0.mdl $lang/L.fst \
"ark:sym2int.pl --map-oov $oov --ignore-first-field $lang/words.txt < $data/split$nj/$n/text |" \
"ark:|gzip -c >$dir/$n.fsts.gz" || touch $dir/.error &
done
wait;
[ -f $dir/.error ] && echo "Error compiling training graphs" && exit 1;
echo "$0: compiling training graphs"
text="ark:sym2int.pl --map-oov $oov -f 2- $lang/words.txt < $sdata/JOB/text|"
$cmd JOB=1:$nj $dir/log/compile_graphs.JOB.log \
compile-train-graphs $dir/tree $dir/0.mdl $lang/L.fst \
"$text" "ark:|gzip -c >$dir/fsts.JOB.gz" || exit 1;
fi
if [ $stage -le -1 ]; then
echo "Converting alignments" # don't bother parallelizing; very fast.
for n in `get_splits.pl $nj`; do
convert-ali $alidir/final.mdl $dir/0.mdl $dir/tree "ark:gunzip -c $alidir/$n.ali.gz|" \
"ark:|gzip -c >$dir/$n.ali.gz" 2>$dir/log/convert$n.log
done
echo "Converting alignments"
$cmd JOB=1:$nj $dir/log/convert_ali.JOB.log \
convert-ali $alidir/final.mdl $dir/0.mdl $dir/tree "ark:gunzip -c $alidir/ali.JOB.gz|" \
"ark:|gzip -c >$dir/ali.JOB.gz" || exit 1;
fi
x=0
while [ $x -lt $num_iters ]; do
echo "Pass $x ... "
if echo $realign_iters | grep -w $x >/dev/null; then
if [ $stage -le $x ]; then
echo "Aligning data"
for n in `get_splits.pl $nj`; do
$cmd $dir/log/align.$x.$n.log \
sgmm-align-compiled ${spkvecs_opt[$n]} $scale_opts "${gselect_opt[$n]}" \
--utt2spk=ark:$data/split$nj/$n/utt2spk --beam=8 --retry-beam=40 \
$dir/$x.mdl "ark:gunzip -c $dir/$n.fsts.gz|" "${featspart[$n]}" \
"ark:|gzip -c >$dir/$n.ali.gz" || touch $dir/.error &
done
wait;
[ -f $dir/.error ] && echo "Error realigning data on iter $x" && exit 1;
fi
echo "$0: training pass $x ... "
if echo $realign_iters | grep -w $x >/dev/null && [ $stage -le $x ]; then
echo "$0: re-aligning data"
$cmd JOB=1:$nj $dir/log/align.$x.JOB.log \
sgmm-align-compiled $spkvecs_opt $scale_opts "$gselect_opt" \
--utt2spk=ark:$sdata/JOB/utt2spk --beam=$beam --retry-beam=$retry_beam \
$dir/$x.mdl "ark:gunzip -c $dir/fsts.JOB.gz|" "$feats" \
"ark:|gzip -c >$dir/ali.JOB.gz" || exit 1;
fi
if [ $spk_dim -gt 0 ] && echo $spkvec_iters | grep -w $x >/dev/null; then
for n in `get_splits.pl $nj`; do
if [ $stage -le $x ]; then
$cmd $dir/log/spkvecs.$x.$n.log \
ali-to-post "ark:gunzip -c $dir/$n.ali.gz|" ark:- \| \
weight-silence-post 0.01 $silphonelist $dir/$x.mdl ark:- ark:- \| \
sgmm-est-spkvecs --spk2utt=ark:$data/split$nj/$n/spk2utt \
${spkvecs_opt[$n]} "${gselect_opt[$n]}" $dir/$x.mdl \
"${featspart[$n]}" ark,s,cs:- ark:$dir/tmp$n.vecs \
&& mv $dir/tmp$n.vecs $dir/$n.vecs || touch $dir/.error &
fi
spkvecs_opt[$n]="--spk-vecs=ark:$dir/$n.vecs"
done
wait;
[ -f $dir/.error ] && echo "Error computing speaker vectors on iter $x" && exit 1;
if [ $stage -le $x ]; then
$cmd $dir/log/spkvecs.$x.JOB.log \
ali-to-post "ark:gunzip -c $dir/ali.JOB.gz|" ark:- \| \
weight-silence-post 0.01 $silphonelist $dir/$x.mdl ark:- ark:- \| \
sgmm-est-spkvecs --rand-prune=$rand_prune --spk2utt=ark:$sdata/JOB/spk2utt \
$spkvecs_opt "$gselect_opt" $dir/$x.mdl "$feats" ark,s,cs:- \
ark:$dir/tmp_vecs.JOB '&&' mv $dir/tmp_vecs.JOB $dir/vecs.JOB || exit 1;
fi
spkvecs_opt[$n]="--spk-vecs=ark:$dir/vecs.JOB"
fi
if [ $x -eq 0 ]; then
flags=vwcSt # On first iter, don't update M or N.
flags=vwcSt # on the first iteration, don't update projections M or N
elif [ $spk_dim -gt 0 -a $[$x%2] -eq 1 -a $x -ge `echo $spkvec_iters | awk '{print $1}'` ]; then
# Update N if we have spk-space and x is odd, and we're at least at 1st spkvec iter.
# Update N if we have speaker-vector space and x is odd,
# and we've already updated the speaker vectors...
flags=vNwcSt
else # Else update M but not N.
else
# otherwise update M.
flags=vMwcSt
fi
if [ $stage -le $x ]; then
for n in `get_splits.pl $nj`; do
$cmd $dir/log/acc.$x.$n.log \
sgmm-acc-stats ${spkvecs_opt[$n]} --utt2spk=ark:$data/split$nj/$n/utt2spk \
--update-flags=$flags "${gselect_opt[$n]}" --rand-prune=$randprune \
$dir/$x.mdl "${featspart[$n]}" "ark,s,cs:ali-to-post 'ark:gunzip -c $dir/$n.ali.gz|' ark:-|" \
$dir/$x.$n.acc || touch $dir/.error &
done
wait;
[ -f $dir/.error ] && echo "Error accumulating stats on iter $x" && exit 1;
$cmd $dir/log/acc.$x.JOB.log \
sgmm-acc-stats $spkvecs_opt --utt2spk=ark:$sdata/JOB/utt2spk \
--update-flags=$flags "$gselect_opt" --rand-prune=$rand_prune \
$dir/$x.mdl "$feats" "ark,s,cs:gunzip -c $dir/ali.JOB.gz | ali-to-post ark:- ark:-|" \
$dir/$x.JOB.acc || exit 1;
fi
add_dim_opts=
if echo $add_dim_iters | grep -w $x >/dev/null; then
add_dim_opts="--increase-phn-dim=$phn_dim --increase-spk-dim=$spk_dim"
# The next option is needed if the user specifies a phone or speaker sub-space
# dimension that's higher than the "normal" one.
increase_dim_opts=
if echo $increase_dim_iters | grep -w $x >/dev/null; then
increase_dim_opts="--increase-phn-dim=$phn_dim --increase-spk-dim=$spk_dim"
# Note: the command below might have a null effect on some iterations.
if [ $spk_dim -gt $feat_dim ]; then
cmd JOB=1:$nj $dir/log/copy_vecs.$x.JOB.log \
copy-vector --print-args=false --change-dim=$spk_dim \
ark:$dir/vecs.JOB ark:$dir/vecs_tmp.$JOB '&&' \
mv $dir/vecs_tmp.JOB $dir/vecs.JOB || exit 1;
fi
fi
if [ $stage -le $x ]; then
$cmd $dir/log/update.$x.log \
sgmm-est --update-flags=$flags --split-substates=$numsubstates $add_dim_opts \
sgmm-est --update-flags=$flags --split-substates=$numsubstates $increase_dim_opts \
--write-occs=$dir/$[$x+1].occs $dir/$x.mdl "sgmm-sum-accs - $dir/$x.*.acc|" \
$dir/$[$x+1].mdl || exit 1;
rm $dir/$x.mdl $dir/$x.*.acc
rm $dir/$x.occs
rm $dir/$x.mdl $dir/$x.*.acc $dir/$x.occs
fi
if [ $x -lt $maxiterinc ]; then
if [ $x -lt $max_iter_inc ]; then
numsubstates=$[$numsubstates+$incsubstates]
fi
x=$[$x+1];
done
( cd $dir; rm final.mdl final.occs 2>/dev/null;
ln -s $x.mdl final.mdl;
ln -s $x.occs final.occs )
rm $dir/final.mdl $dir/final.occs 2>/dev/null
ln -s $x.mdl $dir/final.mdl
ln -s $x.occs $dir/final.occs
if [ $spk_dim -gt 0 ]; then
# If we have speaker vectors, we need an alignment model.
# The point of this last phase of accumulation is to get Gaussian-level
# alignments with the speaker vectors but accumulate stats without
# any speaker vectors; we re-estimate M, w, c and S to get a model
# that's compatible with not having speaker vectors.
# We need to create an "alignment model" that's been trained
# without the speaker vectors, to do the first-pass decoding with.
# in test time.
# We do this for a few iters, in this recipe.
cur_alimdl=$dir/$x.mdl
y=0;
while [ $y -lt $num_iters_alimdl ]; do
echo "Pass $y of building alignment model"
if [ $y -eq 0 ]; then
flags=MwcS # First time don't update v...
while [ $x -lt $[$num_iters+$num_iters_alimdl] ]; do
echo "$0: building alignment model (pass $y)"
if [ $x -eq $num_iters ]; then # 1st pass of building alimdl.
flags=MwcS # don't update v the first time. Note-- we never update transitions.
# they wouldn't change anyway as we use the same alignment as previously.
else
flags=vMwcS # don't update transitions-- will probably share graph with normal model.
flags=vMwcS
fi
if [ $stage -le $[$y+100] ]; then
for n in `get_splits.pl $nj`; do
$cmd $dir/log/acc_ali.$y.$n.log \
ali-to-post "ark:gunzip -c $dir/$n.ali.gz|" ark:- \| \
sgmm-post-to-gpost ${spkvecs_opt[$n]} "${gselect_opt[$n]}" \
--utt2spk=ark:$data/split$nj/$n/utt2spk $dir/$x.mdl "${featspart[$n]}" ark,s,cs:- ark:- \| \
sgmm-acc-stats-gpost --update-flags=$flags $cur_alimdl "${featspart[$n]}" \
ark,s,cs:- $dir/$y.$n.aliacc || touch $dir/.error &
done
wait;
[ -f $dir/.error ] && echo "Error accumulating stats for alignment model on iter $y" && exit 1;
$cmd $dir/log/update_ali.$y.log \
sgmm-est --update-flags=$flags --remove-speaker-space=true $cur_alimdl \
"sgmm-sum-accs - $dir/$y.*.aliacc|" $dir/$[$y+1].alimdl || exit 1;
rm $dir/$y.*.aliacc || exit 1;
[ $y -gt 0 ] && rm $dir/$y.alimdl
if [ $stage -le $x ]; then
$cmd $dir/log/acc_ali.$x.JOB.log \
ali-to-post "ark:gunzip -c $dir/ali.JOB.gz|" ark:- \| \
sgmm-post-to-gpost $spkvecs_opt "$gselect_opt" \
--utt2spk=ark:$sdata/JOB/utt2spk $dir/$x.mdl "$feats" ark,s,cs:- ark:- \| \
sgmm-acc-stats-gpost --update-flags=$flags $cur_alimdl "$feats" \
ark,s,cs:- $dir/$x.JOB.aliacc || exit 1;
$cmd $dir/log/update_ali.$x.log \
sgmm-est --update-flags=$flags --remove-speaker-space=true $cur_alimdl \
"sgmm-sum-accs - $dir/$x.*.aliacc|" $dir/$[$x+1].alimdl || exit 1;
rm $dir/$x.*.aliacc || exit 1;
[ $x -gt $num_iters ] && rm $dir/$x.alimdl
fi
cur_alimdl=$dir/$[$y+1].alimdl
y=$[$y+1]
cur_alimdl=$dir/$[$x+1].alimdl
x=$[$x+1]
done
(cd $dir; rm final.alimdl 2>/dev/null; ln -s $y.alimdl final.alimdl )
rm $dir/final.alimdl 2>/dev/null
ln -s $x.alimdl $dir/final.alimdl
fi
# Print out summary of the warning messages.
for x in $dir/log/*.log; do
n=`grep WARNING $x | wc -l`;
if [ $n -ne 0 ]; then echo $n warnings in $x; fi;
done
utils/summarize_warnings.pl $dir/log
echo Done
......@@ -63,15 +63,15 @@ 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 ark:- ark:- | transform-feats $alidir/final.mat ark:- 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 ark:- ark:- | transform-feats $alidir/final.mat ark:- ark:- |"
cp $alidir/final.mat $dir
;;
*) echo "$0: invalid feature type $feat_type" && exit 1;
esac
if [ -f $alidir/1.trans ]; then
echo "$0: using transforms from $alidir"
feats="$sifeats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/JOB.trans ark:- ark:- |"
feats="$feats transform-feats --utt2spk=ark:$sdata/JOB/utt2spk ark,s,cs:$alidir/JOB.trans ark:- ark:- |"
fi
##
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment