Comments (10)
I've added a install_mkl.sh script to the tools directory that should install MKL for you. This would be the fastest option for Intel processors. For AMD, OpenBLAS (https://www.openblas.net/) might be better.
I'm a bit surprised that it says "configured to use MKL" even if you don't have it installed - it should figure out by itself what BLAS library you have (MKL, OpenBLAS, ATLAS etc.). Chances are you had none of those installed?
from pykaldi.
Yeah, I found that the underlying issue is this package requires Intel's MKL library. I have installed OpenBLAS and Atlas in the past, but if those were still installed, why would it error out?
I also found this blog which lead to me this Intel page on installing their MKL Ubuntu repo.
That allowed me to easily install MKL with:
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo apt install intel-basekit
After that, the ./install_kaldi.sh
finally completed without error.
However, pykaldi is still broken, and running:
python -c "from kaldi.asr import NnetLatticeFasterRecognizer"
In my Python3.9 virtualenv gives me the error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/project/.env/lib/python3.9/site-packages/kaldi/__init__.py", line 14, in <module>
from . import base
File "/project/.env/lib/python3.9/site-packages/kaldi/base/__init__.py", line 1, in <module>
from ._kaldi_error import *
ImportError: /project/.env/lib/python3.9/site-packages/kaldi/base/_kaldi_error.so: undefined symbol: _ZN5kaldi25g_abort_on_assert_failureE
from pykaldi.
from pykaldi.
If I do that, it just gives me a different error:
(.env) chris@localhost:~/project/tools$ source ./path.sh
(.env) chris@localhost:~/project/tools$ python -c "from kaldi.asr import NnetLatticeFasterRecognizer"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/chris/project/.env/lib/python3.9/site-packages/kaldi/asr.py", line 14, in <module>
from . import decoder as _dec
File "/home/chris/project/.env/lib/python3.9/site-packages/kaldi/decoder/__init__.py", line 1, in <module>
from ._grammar_fst import *
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/chris/project/.env/lib/python3.9/site-packages/kaldi/decoder/../fstext/_float_weight.so)
from pykaldi.
What OS and version are you using? I guess your glibc is too old. It should work on ubuntu 20.04, it has glibc 2.31, your distro must be older than that.
from pykaldi.
I'm running Ubuntu 18.04 and Python3.9.
from pykaldi.
I have GLIBC 2.27 installed. Is there any way to get it to work with that?
from pykaldi.
from pykaldi.
Ok, I upgraded to Ubuntu 20.04, and that fixed the glibc error.
Seems to be working now. The only caveat I'm seeing is it only seems to work from inside the pykaldi/tools
directory. If I source the path.sh
file from outside the directory or source it inside the directory but then run python from somewhere else, any attempt to access Kaldi fails with:
File "/project/test.py", line 18, in <module>
from kaldi.asr import NnetLatticeFasterRecognizer
File "/project/.env/lib/python3.9/site-packages/kaldi/__init__.py", line 14, in <module>
from . import base
File "/project/.env/lib/python3.9/site-packages/kaldi/base/__init__.py", line 1, in <module>
from ._kaldi_error import *
ImportError: /project/.env/lib/python3.9/site-packages/kaldi/base/_kaldi_error.so: undefined symbol: _ZN5kaldi25g_abort_on_assert_failureE
Is there any work around for this? Not a huge deal, but it would be nice to not have to limit my application to CDing into that directory.
My total install script to get a working Kaldi environment turned out to be:
virtualenv -p python3.9 .env
. .env/bin/activate
pip install numpy
wget http://ltdata1.informatik.uni-hamburg.de/pykaldi/pykaldi-0.2.2-cp39-cp39-linux_x86_64.whl
pip install pykaldi-0.2.2-cp39-cp39-linux_x86_64.whl
git clone https://github.com/pykaldi/pykaldi.git
cd pykaldi/tools/
pip install --upgrade pip
pip install --upgrade setuptools
pip install pyparsing
pip install ninja
./check_dependencies.sh
./install_protobuf.sh
./install_clif.sh
./install_mkl.sh
./install_kaldi.sh
. path.sh
python -c "from kaldi.asr import NnetLatticeFasterRecognizer"
Am I missing a step?
from pykaldi.
Just a FYI, you don't need:
./check_dependencies.sh
./install_protobuf.sh
./install_clif.sh
If you are installing from a whl package
from pykaldi.
Related Issues (20)
- pyclif build - SVN down
- Failed to install pykaldi(installing CLIF) HOT 4
- Injecting custom online features with a nnet3 model using online2
- How to use the /kaldi/alignment.py
- check_dependencies.sh - Issue with numpy HOT 1
- Broken Wheels HOT 6
- nnet3-compute output dim not as expected HOT 1
- GetPdf method in AmDiagGmm HOT 2
- Pykaldi on Conda Forge HOT 8
- fstext/_symbol_table.so: undefined symbol
- Could not find Kaldi. Please install Kaldi under the tools directory or set KALDI_DIR environment variable. HOT 1
- A TDNN-LSTM model is supported for pykaldi ? HOT 1
- ImportError: libkaldi-base.so: cannot open shared object file: No such file or directory HOT 1
- Error install CLIF
- look for help about the PyKaldi HOT 1
- clif setup.py fails for python3.10 HOT 3
- Path in run_vad.sh is incorrect
- python setup.py test failes with kaldi module not found HOT 1
- PyKaldi Installed successfully but can not be imported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pykaldi.