Cannot import 'k2_to_openfst'
Closed this issue · 5 comments
Hello, I am having an issue following this code snippet:
https://github.com/csukuangfj/kaldifst/blob/d83a76ecba5e0a198231855910f90e4b24b5c7f5/kaldifst/python/tests/test_k2_converter.py#L5
I was trying to import k2_to_openfst
but it failed. Here is an google colab notebook to reproduce the issue:
https://colab.research.google.com/drive/1MIjTZTgOQOUHaIe_j3IVmrmCRek8b_JT?usp=sharing
Would you mind taking a look, or suggest how to resolve it? Thanks a lot!
Sorry. I will look into it after the lunch.
@huangruizhe
Could you try the latest version v0.7? I just fixed it.
By the way, you can use
export KALDIFST_MAKE_ARGS="-j6"
pip install kaldifst
to use 6 tasks to compile kaldifst, which can reduce compilation time.
If you have plenty of CPUs and memory, you can replace -j6
with -j
.
Great and many thanks! And thanks for the great suggestion. I will try it now.
It works!! For both the importing issue and the speeding up of compilation time.
Thank you so much!