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

Does it support the latest Kaldi? #3

Open
weedwind opened this issue Dec 4, 2017 · 3 comments
Open

Does it support the latest Kaldi? #3

weedwind opened this issue Dec 4, 2017 · 3 comments

Comments

@weedwind
Copy link

weedwind commented Dec 4, 2017

Hi, RicherMans,

I installed the latest Kaldi. When I make files, it reports
/home/xliu/PLDA/src/kaldi-utils.hpp: In function ‘kaldi::Matrix kaldi::readFeatureFromPyString(PyObject*)’:
/home/xliu/PLDA/src/kaldi-utils.hpp:44:41: error: ‘PyString_Check’ was not declared in this scope
PyString_Check(pyfeaturefilename);
^
/home/xliu/PLDA/src/kaldi-utils.hpp:45:74: error: ‘PyString_AsString’ was not declared in this scope
const char* featurefilename = PyString_AsString(pyfeaturefilename);
^
/home/xliu/PLDA/src/pldamodule.cpp: In function ‘PyObject* kaldi::Mplda_transform(kaldi::MPlda*, PyObject*, PyObject*)’:
/home/xliu/PLDA/src/pldamodule.cpp:173:57: error: ‘PyInt_FromSize_t’ was not declared in this scope

and other errors like these. I am wondering which Kaldi version does your python wrapper support?

Thank you very much.

@RicherMans
Copy link
Owner

Hey there,
when I wrote this wrapper I used python2 explicitly, so no python3 support. I currently am also not planning to do any extensions on that. Can you check if its also under Python2 ?

@weedwind
Copy link
Author

weedwind commented Dec 4, 2017

Thank you for your help. I think it used python 3. I have both python 2.7 and python 3.5. How do I use python 2 to build it by default?

@RicherMans
Copy link
Owner

RicherMans commented Dec 4, 2017

Try as the CMake Header suggests for your cmake parameters:

-DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so -DPYTHON_INCLUDE_DIR=/usr/include/python2.7/

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

2 participants