icefall icon indicating copy to clipboard operation
icefall copied to clipboard

use compile_hlg_using_openfst.py

Open wwfcnu opened this issue 2 years ago • 7 comments

now i have lm.arpa 、lexicon.txt 、wordlist ,Which script should I use to generate HLG icefall/egs/librispeech/ASR/prepare.sh ?

wwfcnu avatar Dec 14 '22 05:12 wwfcnu

You can either use compile_hlg_using_openfst.py (if your G is very large and if compile_hlg.py throws OOM) or compile_hlg.py.

You can choose any of them if they both work.

https://github.com/k2-fsa/icefall/blob/b293db4baf1606cfe95066cf28ffde56173a7ddb/egs/librispeech/ASR/prepare.sh#L309-L311

csukuangfj avatar Dec 14 '22 05:12 csukuangfj

You can either use compile_hlg_using_openfst.py (if your G is very large and if compile_hlg.py throws OOM) or compile_hlg.py.

You can choose any of them if they both work.

https://github.com/k2-fsa/icefall/blob/b293db4baf1606cfe95066cf28ffde56173a7ddb/egs/librispeech/ASR/prepare.sh#L309-L311 Which script got that L_disambig.fst

wwfcnu avatar Dec 14 '22 05:12 wwfcnu

I used make_hlg.sh before

wwfcnu avatar Dec 14 '22 05:12 wwfcnu

I used make_hlg.sh before

I think make_hlg.sh invokes compile_hlg.py. You can replace it with compile_hlg_using_openfst.py if you encounter OOM due to using a large G.

csukuangfj avatar Dec 14 '22 06:12 csukuangfj

I used make_hlg.sh before

I think make_hlg.sh invokes compile_hlg.py. You can replace it with compile_hlg_using_openfst.py if you encounter OOM due to using a large G.

but the required documents are not the same,compile_hlg_using_openfst.py need L_disambig.fst etc , make_hlg.sh generate L_disambig.pt etc

wwfcnu avatar Dec 14 '22 07:12 wwfcnu

Required files are generated by

https://github.com/k2-fsa/icefall/blob/fbc88948044278b687a57309248eb2ae6df0a415/egs/librispeech/ASR/prepare.sh#L172-L187

csukuangfj avatar Dec 14 '22 07:12 csukuangfj

ok,thanks

wwfcnu avatar Dec 14 '22 07:12 wwfcnu