]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/kaldi.git/commitdiff
[egs] small update to librispeech recipe, RE const-FST.
authorDaniel Povey <dpovey@gmail.com>
Thu, 22 Jun 2017 18:08:27 +0000 (14:08 -0400)
committerDaniel Povey <dpovey@gmail.com>
Thu, 22 Jun 2017 18:08:27 +0000 (14:08 -0400)
egs/librispeech/s5/local/chain/run_tdnn.sh

index 39e0890e2081227b27ed3ecfb595d7dd26c5be27..992bb205eea36a98a5084b16cfa815b5cdc87000 100755 (executable)
@@ -77,7 +77,7 @@ for f in $gmm_dir/final.mdl $train_data_dir/feats.scp $train_ivector_dir/ivector
 done
 
 # Please take this as a reference on how to specify all the options of
-# local/chain/run_chain_common.sh  
+# local/chain/run_chain_common.sh
 local/chain/run_chain_common.sh --stage $stage \
                                 --gmm-dir $gmm_dir \
                                 --ali-dir $ali_dir \
@@ -153,8 +153,10 @@ if [ $stage -le 16 ]; then
   # far as the 'topo' is concerned, but this script doesn't read the 'topo' from
   # the lang directory.
   utils/mkgraph.sh --self-loop-scale 1.0 --remove-oov data/lang_test_tgsmall $dir $graph_dir
-  # romove <UNK> from the graph
-  fstrmsymbols --apply-to-output=true --remove-arcs=true "echo 3|" $graph_dir/HCLG.fst $graph_dir/HCLG.fst
+  # remove <UNK> from the graph, and convert back to const-FST.
+  fstrmsymbols --apply-to-output=true --remove-arcs=true "echo 3|" $graph_dir/HCLG.fst - | \
+    fstconvert --fst_type=const > $graph_dir/temp.fst
+  mv $graph_dir/temp.fst graph_dir/HCLG.fst
 fi