k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.1k stars 214 forks source link

HLG cannot be determinized after converting to openfst format #1221

Open wangtiance opened 1 year ago

wangtiance commented 1 year ago

I generated HLG following the procedures in https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/local/compile_hlg_using_openfst.py

Now, since k2 does not support minimization, I tried converting the resulting HLG to fst format and do det and min.

HLG_fst = kaldifst.utils.k2_to_openfst(HLG, olabels='aux_labels') kaldifst.determinize_star(HLG_fst)

But I get the error:

However, based on the definition here, I don't see why HLG is not functional. Could someone help? Thanks! https://www.openfst.org/twiki/bin/view/FST/FstGlossary#FunctionalDef