Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyKaldi Pip whl packages #261

Open
bmilde opened this issue Mar 10, 2021 · 7 comments
Open

PyKaldi Pip whl packages #261

bmilde opened this issue Mar 10, 2021 · 7 comments

Comments

@bmilde
Copy link
Contributor

bmilde commented Mar 10, 2021

Currently its not very easy to install pykaldi as outlined on the main page of this repo and the compilation is error prone depending on your compiler and Python version. It also takes many hours even on fast CPUs to compile everything even if you encounter no errors.

Just a FYI that we have created whl packages for Python 3.6 / 3.7 / 3.8 for pykaldi 0.1.2 and are hosting them at our university in this folder: https://ltdata1.informatik.uni-hamburg.de/pykaldi/

We have installation instructions in: https://ltdata1.informatik.uni-hamburg.de/pykaldi/README.txt

Kaldi needs to be compiled separately, but this can be done much quicker than compiling llvm/protobuf/clif etc. Also it can be linked against MKL, making it quite a bit faster if you have an Intel CPU, see the README.

Most users will find these much easier to work with, maybe you can link to our university folder from the main page? Or host these packages on PyPI?

@yaleimeng
Copy link

Thanks ! This is what I want.

@tjysdsg
Copy link

tjysdsg commented Jul 27, 2021

Still, it would be great if we can install pykaldi just using pip install pykaldi. Also, the anaconda package has been outdated for quite a while.

@bmilde
Copy link
Contributor Author

bmilde commented Jul 27, 2021 via email

@mauvilsa
Copy link

How big are your wheel packages? I have created a wheel package that includes all libfst*.so and libkaldi*.so such that to use in Ubuntu 20.04 the only requirement is to do apt-get install python3-pip intel-mkl && pip3 install pykaldi*.whl. The whl file is only 40M. I achieved this by stripping out debug symbols from the *.so files. Would this be of interest? Anyway if in pypi the whl files are without debugging symbols, the respective whl file including debugging symbols could be hosted elsewhere for when people need to debug.

You can find a built package in https://drive.google.com/file/d/1BcMVUdpUakgmutPEAWoAE39P6dfsHFif/view?usp=sharing. It has the linux_x86_64 tag so it can't be uploaded to pypi. But the stripping of symbols could be done for any package. If there is interest in this I could share how I did it.

@srdecny
Copy link

srdecny commented Feb 23, 2024

@mauvilsa Could you please share how you managed to include the libkaldi*.so files into the wheel?

@mauvilsa
Copy link

@srdecny find attached. Just run build_mkl_wheel.sh.
build-pykaldi-whl.zip

@srdecny
Copy link

srdecny commented Feb 23, 2024

@mauvilsa Thanks for the quick response! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants