alumae / gst-kaldi-nnet2-online

GStreamer plugin around Kaldi's online neural network decoder
Apache License 2.0
185 stars 100 forks source link

Kaldi make cmd fails for the lateset Kaldi version #89

Closed MiriamJu closed 5 years ago

MiriamJu commented 5 years ago

Hi,

In order to use the nnet decoder I run the command : "KALDI_ROOT=~/tools/kaldi make", but it fails with the error below:

Makefile:74: warning: overriding recipe for target clean' /root/tools/kaldi/src/makefiles/default_rules.mk:85: warning: ignoring old recipe for targetclean' Makefile:78: warning: overriding recipe for target depend' /root/tools/kaldi/src/makefiles/default_rules.mk:149: warning: ignoring old recipe for targetdepend' g++ -std=c++11 -I.. -isystem /root/tools/kaldi/tools/openfst-1.6.7/include -O1 -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_MKL -I/opt/intel/mkl/include -m64 -msse -msse2 -pthread -g -fPIC -I/root/tools/kaldi/src -c -o gstkaldinnet2onlinedecoder.o gstkaldinnet2onlinedecoder.cc gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_threaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder, bool&, int32, kaldi::BaseFloat, kaldi::Vector)’: gstkaldinnet2onlinedecoder.cc:1314:68: error: no matching function for call to ‘kaldi::SingleUtteranceNnet2DecoderThreaded::SingleUtteranceNnet2DecoderThreaded(kaldi::OnlineNnet2DecodingThreadedConfig&, kaldi::TransitionModel&, kaldi::nnet2::AmNnet&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl > >&, kaldi::OnlineNnet2FeaturePipelineInfo&, kaldi::OnlineIvectorExtractorAdaptationState&)’ *(filter->adaptation_state)); ^ gstkaldinnet2onlinedecoder.cc:1314:68: note: candidate is: In file included from ./gstkaldinnet2onlinedecoder.h:29:0, from gstkaldinnet2onlinedecoder.cc:50: /root/tools/kaldi/src/online2/online-nnet2-decoding-threaded.h:197:3: note: kaldi::SingleUtteranceNnet2DecoderThreaded::SingleUtteranceNnet2DecoderThreaded(const kaldi::OnlineNnet2DecodingThreadedConfig&, const kaldi::TransitionModel&, const kaldi::nnet2::AmNnet&, const fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl > >&, const kaldi::OnlineNnet2FeaturePipelineInfo&, const kaldi::OnlineIvectorExtractorAdaptationState&, const kaldi::OnlineCmvnState&) SingleUtteranceNnet2DecoderThreaded( ^ /root/tools/kaldi/src/online2/online-nnet2-decoding-threaded.h:197:3: note: candidate expects 7 arguments, 6 provided make: *** [gstkaldinnet2onlinedecoder.o] Error 1.

I saw in the kaldi-asr's repo that the online-nnet2-decoding-threaded.h was updated 8 days ago.

Can anyone help me with this issue?

Thanks!

zengyijing commented 5 years ago

Same issue here. Basically, SingleUtteranceNnet2DecoderThreaded is created with one more argument const OnlineCmvnState &cmvn_state now.

mausamsion commented 5 years ago

I too am getting same error

Makefile:74: warning: overriding recipe for target 'clean' \~/kaldi/src/makefiles/default_rules.mk:85: warning: ignoring old recipe for target 'clean' Makefile:78: warning: overriding recipe for target 'depend' \~/kaldi/src/makefiles/default_rules.mk:149: warning: ignoring old recipe for target 'depend' g++ -std=c++11 -I.. -isystem \~/kaldi/tools/openfst-1.6.7/include -O1 -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_MKL -I/opt/intel/mkl/include -m64 -msse -msse2 -pthread -g -fPIC -I\~/kaldi/src -c -o gstkaldinnet2onlinedecoder.o gstkaldinnet2onlinedecoder.cc gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_threaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder, bool&, int32, kaldi::BaseFloat, kaldi::Vector)’: gstkaldinnet2onlinedecoder.cc:1314:68: error: no matching function for call to ‘kaldi::SingleUtteranceNnet2DecoderThreaded::SingleUtteranceNnet2DecoderThreaded(kaldi::OnlineNnet2DecodingThreadedConfig&, kaldi::TransitionModel&, kaldi::nnet2::AmNnet&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl > >&, kaldi::OnlineNnet2FeaturePipelineInfo&, kaldi::OnlineIvectorExtractorAdaptationState&)’ *(filter->adaptation_state)); ^ In file included from ./gstkaldinnet2onlinedecoder.h:29:0, from gstkaldinnet2onlinedecoder.cc:50: \~/kaldi/src/online2/online-nnet2-decoding-threaded.h:197:3: note: candidate: kaldi::SingleUtteranceNnet2DecoderThreaded::SingleUtteranceNnet2DecoderThreaded(const kaldi::OnlineNnet2DecodingThreadedConfig&, const kaldi::TransitionModel&, const kaldi::nnet2::AmNnet&, const fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl > >&, const kaldi::OnlineNnet2FeaturePipelineInfo&, const kaldi::OnlineIvectorExtractorAdaptationState&, const kaldi::OnlineCmvnState&) SingleUtteranceNnet2DecoderThreaded( ^~~~~~~~~~~ \~/kaldi/src/online2/online-nnet2-decoding-threaded.h:197:3: note: candidate expects 7 arguments, 6 provided

: recipe for target 'gstkaldinnet2onlinedecoder.o' failed make: *** [gstkaldinnet2onlinedecoder.o] Error
MiriamJu commented 5 years ago

As a temporary solution to the problem, you can checkout on Kaldi's repository the commit that was before they changed the api. I did it and it works.

alumae commented 5 years ago

Should be fixed now. Not tested very carefully, any bug reports are welcome.

mirfan899 commented 4 years ago

Getting the same error on Debian 10

KALDI_ROOT=/root/kaldi make
Makefile:75: warning: overriding recipe for target 'clean'
/root/kaldi/src/makefiles/default_rules.mk:85: warning: ignoring old recipe for target 'clean'
Makefile:79: warning: overriding recipe for target 'depend'
/root/kaldi/src/makefiles/default_rules.mk:149: warning: ignoring old recipe for target 'depend'
g++ -std=c++11 -I.. -isystem /root/kaldi/tools/openfst-1.6.7/include -O1 -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_MKL -I/opt/intel/mkl/include -m64 -msse -msse2 -pthread -g -fPIC -DHAVE_SPEEX -I/root/kaldi/src/../tools/speex/include -I/root/kaldi/src   -c -o gstkaldinnet2onlinedecoder.o gstkaldinnet2onlinedecoder.cc
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_reset_cmvn_state(kaldi::Gstkaldinnet2onlinedecoder*)’:
gstkaldinnet2onlinedecoder.cc:2082:29: error: ‘struct kaldi::OnlineNnet2FeaturePipelineInfo’ has no member named ‘global_cmvn_stats_rxfilename’; did you mean ‘global_cmvn_stats’?
   if (filter->feature_info->global_cmvn_stats_rxfilename != "")
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             global_cmvn_stats
gstkaldinnet2onlinedecoder.cc:2083:45: error: ‘struct kaldi::OnlineNnet2FeaturePipelineInfo’ has no member named ‘global_cmvn_stats_rxfilename’; did you mean ‘global_cmvn_stats’?
       ReadKaldiObject(filter->feature_info->global_cmvn_stats_rxfilename,
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                             global_cmvn_stats
make: *** [<builtin>: gstkaldinnet2onlinedecoder.o] Error 1