RicherMans / PLDA

An LDA/PLDA estimator using KALDI in python for speaker verification tasks
99 stars 24 forks source link

Does it support the latest Kaldi? #3

Open weedwind opened 6 years ago

weedwind commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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/