Commit 7c6eedfb authored by Jan Trmal's avatar Jan Trmal
Browse files

(trunk)/egs/wsj rename the "lat-beam" parameter to "lattice-beam" parameter. This

was done to follow the convention used in the other scripts


git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@2827 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 0f7b0c36
......@@ -15,7 +15,10 @@ acwt=0.1 # Just a default value, used for adaptation and beam-pruning..
cmd=run.pl
beam=15.0
max_active=7000
lat_beam=8.0 # Beam we use in lattice generation.
#WARNING: This option is renamed lat_beam (it was renamed to follow the naming
# in the other scripts
lattice_beam=8.0 # Beam we use in lattice generation.
iter=final
num_threads=1 # if >1, will use gmm-latgen-faster-parallel
parallel_opts= # If you supply num-threads, you should supply this too.
......@@ -95,7 +98,7 @@ fi
if [ $stage -le 1 ]; then
$cmd $parallel_opts JOB=1:$nj $dir/log/decode.JOB.log \
nnet-latgen-faster$thread_string --max-active=$max_active --beam=$beam --lattice-beam=$lat_beam \
nnet-latgen-faster$thread_string --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam \
--acoustic-scale=$acwt --allow-partial=true --word-symbol-table=$graphdir/words.txt "$model" \
$graphdir/HCLG.fst "$feats" "ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
fi
......
......@@ -21,7 +21,10 @@ gselect=15 # Number of Gaussian-selection indices for SGMMs. [Note:
first_pass_gselect=3 # Use a smaller number of Gaussian-selection indices in
# the 1st pass of decoding (lattice generation).
max_active=7000
lat_beam=8.0 # Beam we use in lattice generation.
#WARNING: This option is renamed lat_beam (it was renamed to follow the naming
# in the other scripts
lattice_beam=8.0 # Beam we use in lattice generation.
vecs_beam=4.0 # Beam we use to prune lattices while getting posteriors for
# speaker-vector computation. Can be quite tight (actually we could
# probably just do best-path.
......@@ -122,7 +125,7 @@ fi
# alignment model and no speaker-vectors.
if [ $stage -le 2 ]; then
$cmd JOB=1:$nj $dir/log/decode_pass1.JOB.log \
sgmm-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lat_beam \
sgmm-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam \
--acoustic-scale=$acwt --determinize-lattice=false --allow-partial=true \
--word-symbol-table=$graphdir/words.txt "$gselect_opt_1stpass" $alignment_model \
$graphdir/HCLG.fst "$feats" "ark:|gzip -c > $dir/pre_lat.JOB.gz" || exit 1;
......@@ -193,7 +196,7 @@ if [ $spkdim -gt 0 ]; then ### For models with speaker vectors:
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata/JOB/utt2spk --spk-vecs=ark:$dir/vecs.JOB \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
fi
rm $dir/pre_lat.*.gz
......@@ -227,7 +230,7 @@ else ### For models without speaker vectors:
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata/JOB/utt2spk \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
rm $dir/pre_lat.*.gz
else # Already done with decoding if no adaptation needed.
......
......@@ -21,7 +21,10 @@ first_pass_gselect=3 # Use a smaller number of Gaussian-selection indices in
# the 1st pass of decoding (lattice generation).
max_active=7000
max_arcs=-1
lat_beam=6.0 # Beam we use in lattice generation.
#WARNING: This option is renamed lat_beam (it was renamed to follow the naming
# in the other scripts
lattice_beam=6.0 # Beam we use in lattice generation.
vecs_beam=4.0 # Beam we use to prune lattices while getting posteriors for
# speaker-vector computation. Can be quite tight (actually we could
# probably just do best-path.
......@@ -112,7 +115,7 @@ fi
# model and no speaker-vectors.
if [ $stage -le 2 ]; then
$cmd $parallel_opts JOB=1:$nj $dir/log/decode_pass1.JOB.log \
sgmm2-latgen-faster$thread_string --max-active=$max_active --beam=$beam --lattice-beam=$lat_beam \
sgmm2-latgen-faster$thread_string --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam \
--max-arcs=$max_arcs --acoustic-scale=$acwt --determinize-lattice=false --allow-partial=true \
--word-symbol-table=$graphdir/words.txt "$gselect_opt_1stpass" $srcdir/final.alimdl \
$graphdir/HCLG.fst "$feats" "ark:|gzip -c > $dir/pre_lat.JOB.gz" || exit 1;
......@@ -182,7 +185,7 @@ if [ $stage -le 6 ]; then
$cmd $parallel_opts JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm2-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata/JOB/utt2spk --spk-vecs=ark:$dir/vecs.JOB \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned$thread_string --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned$thread_string --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
fi
rm $dir/pre_lat.*.gz
......
......@@ -26,7 +26,10 @@ gselect=15 # Number of Gaussian-selection indices for SGMMs. [Note:
first_pass_gselect=3 # Use a smaller number of Gaussian-selection indices in
# the 1st pass of decoding (lattice generation).
max_active=7000
lat_beam=8.0 # Beam we use in lattice generation.
#WARNING: This option is renamed lat_beam (it was renamed to follow the naming
# in the other scripts
lattice_beam=8.0 # Beam we use in lattice generation.
vecs_beam=4.0 # Beam we use to prune lattices while getting posteriors for
# speaker-vector computation. Can be quite tight (actually we could
# probably just do best-path.
......@@ -138,7 +141,7 @@ if [ $stage -le 2 ]; then
compile-train-graphs-fsts --read-disambig-syms=$lang/phones/disambig.int \
--batch-size=$batch_size $scale_opts \
$srcdir/tree $srcdir/final.mdl $lang/L_disambig.fst ark:- ark:- \| \
sgmm-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lat_beam \
sgmm-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam \
--acoustic-scale=$acwt --determinize-lattice=false --allow-partial=true \
--word-symbol-table=$lang/words.txt "$gselect_opt_1stpass" $alignment_model \
"ark:-" "$feats" "ark:|gzip -c > $dir/pre_lat.JOB.gz" || exit 1;
......@@ -209,7 +212,7 @@ if [ $spkdim -gt 0 ]; then ### For models with speaker vectors:
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata/JOB/utt2spk --spk-vecs=ark:$dir/vecs.JOB \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
fi
rm $dir/pre_lat.*.gz
......@@ -243,7 +246,7 @@ else ### For models without speaker vectors:
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata/JOB/utt2spk \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
rm $dir/pre_lat.*.gz
else # Already done with decoding if no adaptation needed.
......
......@@ -22,7 +22,10 @@ gselect=15 # Number of Gaussian-selection indices for SGMMs. [Note:
first_pass_gselect=3 # Use a smaller number of Gaussian-selection indices in
# the 1st pass of decoding (lattice generation).
max_active=7000
lat_beam=8.0 # Beam we use in lattice generation.
#WARNING: This option is renamed lat_beam (it was renamed to follow the naming
# in the other scripts
lattice_beam=8.0 # Beam we use in lattice generation.
vecs_beam=4.0 # Beam we use to prune lattices while getting posteriors for
# speaker-vector computation. Can be quite tight (actually we could
# probably just do best-path.
......@@ -165,7 +168,7 @@ fi
# alignment model and no speaker-vectors.
if [ $stage -le 2 ]; then
$cmd JOB=1:$nj $dir/log/decode_pass1.JOB.log \
sgmm-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lat_beam \
sgmm-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam \
--acoustic-scale=$acwt --determinize-lattice=false --allow-partial=true \
--word-symbol-table=$graphdir/words.txt "$gselect_opt_1stpass" $alignment_model \
$graphdir/HCLG.fst "$feats" "ark:|gzip -c > $dir/pre_lat.JOB.gz" || exit 1;
......@@ -236,7 +239,7 @@ if [ $spkdim -gt 0 ]; then ### For models with speaker vectors:
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata1/JOB/utt2spk --spk-vecs=ark:$dir/vecs.JOB \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
fi
rm $dir/pre_lat.*.gz
......@@ -270,7 +273,7 @@ else ### For models without speaker vectors:
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata1/JOB/utt2spk \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
rm $dir/pre_lat.*.gz
else # Already done with decoding if no adaptation needed.
......
......@@ -21,7 +21,10 @@ gselect=15 # Number of Gaussian-selection indices for SGMMs. [Note:
first_pass_gselect=3 # Use a smaller number of Gaussian-selection indices in
# the 1st pass of decoding (lattice generation).
max_active=7000
lat_beam=6.0 # Beam we use in lattice generation.
#WARNING: This option is renamed lat_beam (it was renamed to follow the naming
# in the other scripts
lattice_beam=6.0 # Beam we use in lattice generation.
vecs_beam=4.0 # Beam we use to prune lattices while getting posteriors for
# speaker-vector computation. Can be quite tight (actually we could
# probably just do best-path.
......@@ -146,7 +149,7 @@ fi
# model and no speaker-vectors.
if [ $stage -le 2 ]; then
$cmd JOB=1:$nj $dir/log/decode_pass1.JOB.log \
sgmm2-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lat_beam \
sgmm2-latgen-faster --max-active=$max_active --beam=$beam --lattice-beam=$lattice_beam \
--acoustic-scale=$acwt --determinize-lattice=false --allow-partial=true \
--word-symbol-table=$graphdir/words.txt "$gselect_opt_1stpass" $srcdir/final.alimdl \
$graphdir/HCLG.fst "$feats" "ark:|gzip -c > $dir/pre_lat.JOB.gz" || exit 1;
......@@ -216,7 +219,7 @@ if [ $stage -le 6 ]; then
$cmd JOB=1:$nj $dir/log/rescore.JOB.log \
sgmm2-rescore-lattice "$gselect_opt" --utt2spk=ark:$sdata1/JOB/utt2spk --spk-vecs=ark:$dir/vecs.JOB \
$srcdir/final.mdl "ark:gunzip -c $dir/pre_lat.JOB.gz|" "$feats" ark:- \| \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lat_beam ark:- \
lattice-determinize-pruned --acoustic-scale=$acwt --beam=$lattice_beam ark:- \
"ark:|gzip -c > $dir/lat.JOB.gz" || exit 1;
fi
rm $dir/pre_lat.*.gz
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment