Open boleamol opened 6 years ago
Looks like a problem of finding kaldi libraries, can you confirm you have all the .so
in /home/amol/kaldi/src/lib
?
There is no lib directory in src/ directory... I have installed kaldi properly also I am running all other experiment successfully without any failure...
But on /home/amol/kaldi/tools/openfst/lib contans following files
fst libfstfar.so libfstscript.a libfst.a libfstfar.so.8 libfstscript.la libfstfar.a libfstfar.so.8.0.0 libfstscript.so libfstfar.la libfst.la libfstscript.so.8 libfstfarscript.a libfstngram.a libfstscript.so.8.0.0 libfstfarscript.la libfstngram.la libfst.so libfstfarscript.so libfstngram.so libfst.so.8 libfstfarscript.so.8 libfstngram.so.8 libfst.so.8.0.0 libfstfarscript.so.8.0.0 libfstngram.so.8.0.0
The libraries you are missing are kaldi libs, not openfst.
There should be a /lib
folder under src
with all kaldi libs, make sure you make
correctly when installing kaldi, if you pull
after first installation, there's a chance you need to make
again.
Sorry but, I have executed the same code on three different version of Kaldi for experiment purpose and got three different errors..
Kaldi latest version (Version 5.5)
There is no /lib directory in src even I run make after git pull & getting same error
amol@amol-HP-406-G1-MT:/media/amol/data/libfvad/KaldiBasedSpeakerVerification/src$ make g++ -std=c++11 -I/home/amol/kaldi/src -I/home/amol/kaldi/tools/openfst/include -DHAVE_ATLAS -I/home/amol/kaldi/tools/ATLAS/include -I/media/amol/data/libfvad/KaldiBasedSpeakerVerification/src -I/media/amol/data/libfvad/KaldiBasedSpeakerVerification/src/extension -I/media/amol/data/libfvad/include -I. -o enroll enroll.cpp -Lusr/local/lib -L/home/amol/kaldi/src/lib -L/home/amol/kaldi/tools/openfst/lib -L/usr/lib64/atlas -lkaldi-base -lkaldi-feat -lkaldi-util -lkaldi-matrix -lkaldi-hmm -lkaldi-gmm -lkaldi-ivector -lpthread -lkaldi-transform -lkaldi-tree -lfst -lfvad /usr/bin/ld: cannot find -lkaldi-base /usr/bin/ld: cannot find -lkaldi-feat /usr/bin/ld: cannot find -lkaldi-util /usr/bin/ld: cannot find -lkaldi-matrix /usr/bin/ld: cannot find -lkaldi-hmm /usr/bin/ld: cannot find -lkaldi-gmm /usr/bin/ld: cannot find -lkaldi-ivector collect2: error: ld returned 1 exit status makefile:22: recipe for target 'enroll' failed make: *** [enroll] Error 1
Kaldi Version 5.4
test@gpu2:/data/speech_to_text/libfvad/KaldiBasedSpeakerVerification/src$ make
g++ -std=c++11 -I/data/speech_to_text/kaldi/src -I/data/speech_to_text/kaldi/tools/openfst/include -DHAVE_ATLAS -I/data/speech_to_text/kaldi/tools/ATLAS/include -I/data/speech_to_text/libfvad/KaldiBasedSpeakerVerification/src -I/data/speech_to_text/libfvad/KaldiBasedSpeakerVerification/src/extension -I/data/speech_to_text/libfvad/include -I. -o identifySpeaker identifySpeaker.cpp -Lusr/local/lib -L/data/speech_to_text/kaldi/src/lib -L/data/speech_to_text/kaldi/tools/openfst/lib -L/usr/lib64/atlas -lkaldi-base -lkaldi-feat -lkaldi-util -lkaldi-matrix -lkaldi-hmm -lkaldi-gmm -lkaldi-ivector -lpthread -lkaldi-transform -lkaldi-tree -lfst -lfvad
identifySpeaker.cpp: In function ‘bool fexists(const char*)’:
identifySpeaker.cpp:504:11: error: cannot convert ‘std::ifstream {aka std::basic_ifstream
Kaldi Version 5.3
test@gpu2:/data/speech_to_text/libfvad/KaldiBasedSpeakerVerification/src$ ./enroll ./enroll: error while loading shared libraries: libkaldi-base.so: cannot open shared object file: No such file or directory
May be I am doing some mistake, you just correct me. I found kaldi/src/lib directory in Kaldi version 5.3 & 5.4 but not in 5.5
I am getting the same error, has anyone solved it ?
Me too. Any ideas?
identifySpeaker.cpp: In function ‘bool fexists(const char*)’:
identifySpeaker.cpp:504:11: error: cannot convert ‘std::ifstream {aka std::basic_ifstream
git clone --branch 5.3 https://github.com/kaldi-asr/kaldi.git
There are a couple errors. The first one is easily solved. This error:
/usr/bin/ld: cannot find -lkaldi-base
/usr/bin/ld: cannot find -lkaldi-feat
/usr/bin/ld: cannot find -lkaldi-util
/usr/bin/ld: cannot find -lkaldi-matrix
/usr/bin/ld: cannot find -lkaldi-hmm
/usr/bin/ld: cannot find -lkaldi-gmm
/usr/bin/ld: cannot find -lkaldi-ivector
is solved by configuring kaldi with "--shared" like so:
./configure --shared
Then follow this with "make clean" before continuing with the compilation. For example:
make -j clean depend; make -j 8
For more info start here: https://kaldi-asr.org/doc/build_setup.html
The second error, the one on line 504, is another issue.
The error on line 504 is straightforward to fix. It's a casting error in the return from checking to see if a file exists. By adding "(bool)" to that line 504, you will cast the return as a boolean and that solves it. Here is what the fexists bool should look like when you're done:
bool fexists(const char *filename){
ifstream ifile(filename);
return (bool)ifile;
}
Save that change and the code will compile after that.
I have installed libfvadproperly, I am having latest kaldi but getting following error while running make in KaldiBasedSpeakerVerification/src. I have provided the correct locations in makefile.
amol@amol-HP-406-G1-MT:/media/amol/data/libfvad/KaldiBasedSpeakerVerification/src$ make g++ -std=c++11 -I/home/amol/kaldi/src -I/home/amol/kaldi/tools/openfst/include -DHAVE_ATLAS -I/home/amol/kaldi/tools/ATLAS/include -I/media/amol/data/libfvad/KaldiBasedSpeakerVerification/src -I/media/amol/data/libfvad/KaldiBasedSpeakerVerification/src/extension -I/media/amol/data/libfvad/include -I. -o enroll enroll.cpp -Lusr/local/lib -L/home/amol/kaldi/src/lib -L/home/amol/kaldi/tools/openfst/lib -L/usr/lib64/atlas -lkaldi-base -lkaldi-feat -lkaldi-util -lkaldi-matrix -lkaldi-hmm -lkaldi-gmm -lkaldi-ivector -lpthread -lkaldi-transform -lkaldi-tree -lfst -lfvad /usr/bin/ld: cannot find -lkaldi-base /usr/bin/ld: cannot find -lkaldi-feat /usr/bin/ld: cannot find -lkaldi-util /usr/bin/ld: cannot find -lkaldi-matrix /usr/bin/ld: cannot find -lkaldi-hmm /usr/bin/ld: cannot find -lkaldi-gmm /usr/bin/ld: cannot find -lkaldi-ivector collect2: error: ld returned 1 exit status makefile:22: recipe for target 'enroll' failed make: *** [enroll] Error 1