Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #192 from k2-fsa/fix/prepare-lang-dir
Browse files Browse the repository at this point in the history
Fix hardcoded librispeech lang dir in local/prepare_lang.sh
  • Loading branch information
danpovey authored May 12, 2021
2 parents 949226f + 598096b commit 5d1b00d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions egs/librispeech/asr/simple_v1/local/prepare_lang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,17 +307,17 @@ if $silprob; then
# and where it's called in the example scripts (run.sh).
local/make_lexicon_fst_silprob.py $grammar_opts --sil-phone=$silphone \
$tmpdir/lexiconp_silprob.txt $srcdir/silprob.txt | \
local/sym2int.pl -f 3 data/lang_nosp/phones.txt | \
local/sym2int.pl -f 4 data/lang_nosp/words.txt > $dir/L.fst.txt || exit 1;
local/sym2int.pl -f 3 $dir/phones.txt | \
local/sym2int.pl -f 4 $dir/words.txt > $dir/L.fst.txt || exit 1;
# fstcompile --isymbols=$dir/phones.txt --osymbols=$dir/words.txt \
# --keep_isymbols=false --keep_osymbols=false | \
# fstarcsort --sort_type=olabel > $dir/L.fst || exit 1;
else
local/make_lexicon_fst.py $grammar_opts --sil-prob=$sil_prob --sil-phone=$silphone \
$tmpdir/lexiconp.txt | \
local/sym2int.pl -f 3 data/lang_nosp/phones.txt | \
local/sym2int.pl -f 4 data/lang_nosp/words.txt > $dir/L.fst.txt || exit 1;
local/sym2int.pl -f 3 $dir/phones.txt | \
local/sym2int.pl -f 4 $dir/words.txt > $dir/L.fst.txt || exit 1;
# fstcompile --isymbols=$dir/phones.txt --osymbols=$dir/words.txt \
# --keep_isymbols=false --keep_osymbols=false | \
Expand Down Expand Up @@ -367,15 +367,15 @@ if $silprob; then
local/make_lexicon_fst_silprob.py $grammar_opts \
--sil-phone=$silphone --sil-disambig='#'$ndisambig \
$tmpdir/lexiconp_silprob_disambig.txt $srcdir/silprob.txt | \
local/sym2int.pl -f 3 data/lang_nosp/phones.txt | \
local/sym2int.pl -f 4 data/lang_nosp/words.txt | \
local/sym2int.pl -f 3 $dir/phones.txt | \
local/sym2int.pl -f 4 $dir/words.txt | \
local/fstaddselfloops.pl $wdisambig_phone $wdisambig_word > $dir/L_disambig.fst.txt || exit 1;
else
local/make_lexicon_fst.py $grammar_opts \
--sil-prob=$sil_prob --sil-phone=$silphone --sil-disambig='#'$ndisambig \
$tmpdir/lexiconp_disambig.txt | \
local/sym2int.pl -f 3 data/lang_nosp/phones.txt | \
local/sym2int.pl -f 4 data/lang_nosp/words.txt | \
local/sym2int.pl -f 3 $dir/phones.txt | \
local/sym2int.pl -f 4 $dir/words.txt | \
local/fstaddselfloops.pl $wdisambig_phone $wdisambig_word > $dir/L_disambig.fst.txt || exit 1;
fi
Expand Down

0 comments on commit 5d1b00d

Please sign in to comment.