精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
服务方向
联系方式
有些文档可能在硬盘ubuntu系统目录下,win下发现编译nnet2-online编译错误,当时想着是nnet2-online和环境(kaldi或gstream)不匹配,要搞新版本或旧版本代码对应解决。
git clone https://github.com/alumae/gst-kaldi-nnet2-online.git
cd src
KALDI_ROOT=/home/shw/kaldi-trunk make depend
KALDI_ROOT=/home/shw/kaldi-trunk make
KALDI_ROOT=
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_unthreaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder*, bool&, int32, kaldi::BaseFloat)’:
gstkaldinnet2onlinedecoder.cc:1493:55: error: no matching function for call to ‘kaldi::OnlineSilenceWeighting::GetDeltaWeights(int32, int, std::vector<std::pair<int, float>, std::allocator<std::pair<int, float> > >*)’
&delta_weights);
^
gstkaldinnet2onlinedecoder.cc:1493:55: note: candidate is:
In file included from /home/shw/kaldi-trunk/src/online2/online-nnet2-feature-pipeline.h:33:0,
from /home/shw/kaldi-trunk/src/online2/online-nnet2-decoding-threaded.h:35,
from ./gstkaldinnet2onlinedecoder.h:29,
from gstkaldinnet2onlinedecoder.cc:50:
/home/shw/kaldi-trunk/src/online2/online-ivector-feature.h:474:8: note: void kaldi::OnlineSilenceWeighting::GetDeltaWeights(int32, std::vector<std::pair<int, float>, std::allocator<std::pair<int, float> > >*)
void GetDeltaWeights(
^
/home/shw/kaldi-trunk/src/online2/online-ivector-feature.h:474:8: note: candidate expects 2 arguments, 3 provided
gstkaldinnet2onlinedecoder.cc:1541:24: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘GetCmvnState’
feature_pipeline.GetCmvnState(filter->cmvn_state);
^
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_nnet3_unthreaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder*, bool&, int32, kaldi::BaseFloat)’:
gstkaldinnet2onlinedecoder.cc:1556:20: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘SetCmvnState’
feature_pipeline.SetCmvnState(*(filter->cmvn_state));
^
gstkaldinnet2onlinedecoder.cc:1573:13: error: ‘class kaldi::SingleUtteranceNnet3Decoder’ has no member named ‘InitDecoding’
decoder.InitDecoding(frame_offset);
^
gstkaldinnet2onlinedecoder.cc:1596:57: error: no matching function for call to ‘kaldi::OnlineSilenceWeighting::GetDeltaWeights(int32, int32, std::vector<std::pair<int, float>, std::allocator<std::pair<int, float> > >*)’
&delta_weights);
^
gstkaldinnet2onlinedecoder.cc:1596:57: note: candidate is:
In file included from /home/shw/kaldi-trunk/src/online2/online-nnet2-feature-pipeline.h:33:0,
from /home/shw/kaldi-trunk/src/online2/online-nnet2-decoding-threaded.h:35,
from ./gstkaldinnet2onlinedecoder.h:29,
from gstkaldinnet2onlinedecoder.cc:50:
/home/shw/kaldi-trunk/src/online2/online-ivector-feature.h:474:8: note: void kaldi::OnlineSilenceWeighting::GetDeltaWeights(int32, std::vector<std::pair<int, float>, std::allocator<std::pair<int, float> > >*)
void GetDeltaWeights(
^
/home/shw/kaldi-trunk/src/online2/online-ivector-feature.h:474:8: note: candidate expects 2 arguments, 3 provided
gstkaldinnet2onlinedecoder.cc:1597:26: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘UpdateFrameWeights’
feature_pipeline.UpdateFrameWeights(delta_weights);
^
gstkaldinnet2onlinedecoder.cc:1645:26: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘GetCmvnState’
feature_pipeline.GetCmvnState(filter->cmvn_state);
^
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’
if (filter->feature_info->global_cmvn_stats_rxfilename != "")
^
gstkaldinnet2onlinedecoder.cc:2083:45: error: ‘struct kaldi::OnlineNnet2FeaturePipelineInfo’ has no member named ‘global_cmvn_stats_rxfilename’
ReadKaldiObject(filter->feature_info->global_cmvn_stats_rxfilename,
^
make: *** [gstkaldinnet2onlinedecoder.o] Error 1
这个问题上次就没解决,
将下载的文件夹放入kaldi/tools下面
UpdateFrameWeights能搜索到,D:\语®?音°?识º?别Àe\kaldi\branches\5.0\src\online2\online-nnet2-feature-pipeline.cc(171):void OnlineNnet2FeaturePipeline::UpdateFrameWeights(
global_cmvn_stats_rxfilename,也能搜索到。
5.0版本下kaldi有,5.1下没有。
加了 thread目录,和nnet3目录,报错
./gstkaldinnet2onlinedecoder.h:93:3: error: ‘NnetSimpleLoopedComputationOptions’ in namespace ‘kaldi::nnet3’ does not name a type
nnet3::NnetSimpleLoopedComputationOptions *nnet3_decodable_opts;
^
./gstkaldinnet2onlinedecoder.h:103:3: error: ‘DecodableNnetSimpleLoopedInfo’ in namespace ‘kaldi::nnet3’ does not name a type
nnet3::DecodableNnetSimpleLoopedInfo *decodable_info_nnet3;
^
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_init(kaldi::Gstkaldinnet2onlinedecoder*)’:
gstkaldinnet2onlinedecoder.cc:527:11: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
filter->nnet3_decodable_opts = new nnet3::NnetSimpleLoopedComputationOptions();
^
gstkaldinnet2onlinedecoder.cc:527:38: error: expected type-specifier
filter->nnet3_decodable_opts = new nnet3::NnetSimpleLoopedComputationOptions();
^
gstkaldinnet2onlinedecoder.cc:527:38: error: expected ‘;’
gstkaldinnet2onlinedecoder.cc:538:13: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
filter->nnet3_decodable_opts->Register(filter->simple_options);
^
gstkaldinnet2onlinedecoder.cc:555:13: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
filter->nnet3_decodable_opts->Register(filter->simple_options);
^
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::register_decoding_config(kaldi::Gstkaldinnet2onlinedecoder*)’:
gstkaldinnet2onlinedecoder.cc:673:13: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
filter->nnet3_decodable_opts->Register(filter->simple_options);
^
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_scale_lattice(kaldi::Gstkaldinnet2onlinedecoder*, kaldi::CompactLattice&)’:
gstkaldinnet2onlinedecoder.cc:1072:42: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
inv_acoustic_scale = 1.0 / filter->nnet3_decodable_opts->acoustic_scale;
^
gstkaldinnet2onlinedecoder.cc: In function ‘std::string kaldi::gst_kaldinnet2onlinedecoder_full_final_result_to_json(kaldi::Gstkaldinnet2onlinedecoder*, const FullFinalResult&)’:
gstkaldinnet2onlinedecoder.cc:1174:30: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
frame_shift *= filter->nnet3_decodable_opts->frame_subsampling_factor;
^
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_threaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder*, bool&, int32, kaldi::BaseFloat, kaldi::Vector<float>*)’:
gstkaldinnet2onlinedecoder.cc:1368:62: error: no matching function for call to ‘kaldi::SingleUtteranceNnet2DecoderThreaded::SingleUtteranceNnet2DecoderThreaded(kaldi::OnlineNnet2DecodingThreadedConfig&, kaldi::TransitionModel&, kaldi::nnet2::AmNnet&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > >&, kaldi::OnlineNnet2FeaturePipelineInfo&, kaldi::OnlineIvectorExtractorAdaptationState&, kaldi::OnlineCmvnState&)’
*(filter->cmvn_state));
^
gstkaldinnet2onlinedecoder.cc:1368:62: note: candidate is:
In file included from ./gstkaldinnet2onlinedecoder.h:29:0,
from gstkaldinnet2onlinedecoder.cc:50:
/home/shw/kaldi-trunk/src/online2/online-nnet2-decoding-threaded.h:196:3: note: kaldi::SingleUtteranceNnet2DecoderThreaded::SingleUtteranceNnet2DecoderThreaded(const kaldi::OnlineNnet2DecodingThreadedConfig&, const kaldi::TransitionModel&, const kaldi::nnet2::AmNnet&, const fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > >&, const kaldi::OnlineNnet2FeaturePipelineInfo&, const kaldi::OnlineIvectorExtractorAdaptationState&)
SingleUtteranceNnet2DecoderThreaded(
^
/home/shw/kaldi-trunk/src/online2/online-nnet2-decoding-threaded.h:196:3: note: candidate expects 6 arguments, 7 provided
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_unthreaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder*, bool&, int32, kaldi::BaseFloat)’:
gstkaldinnet2onlinedecoder.cc:1490:26: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘IvectorFeature’
feature_pipeline.IvectorFeature() != NULL) {
^
gstkaldinnet2onlinedecoder.cc:1492:58: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘IvectorFeature’
silence_weighting.GetDeltaWeights(feature_pipeline.IvectorFeature()->NumFramesReady(), 0,
^
gstkaldinnet2onlinedecoder.cc:1494:24: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘IvectorFeature’
feature_pipeline.IvectorFeature()->UpdateFrameWeights(delta_weights);
^
gstkaldinnet2onlinedecoder.cc:1541:24: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘GetCmvnState’
feature_pipeline.GetCmvnState(filter->cmvn_state);
^
gstkaldinnet2onlinedecoder.cc: In function ‘void kaldi::gst_kaldinnet2onlinedecoder_nnet3_unthreaded_decode_segment(kaldi::Gstkaldinnet2onlinedecoder*, bool&, int32, kaldi::BaseFloat)’:
gstkaldinnet2onlinedecoder.cc:1556:20: error: ‘class kaldi::OnlineNnet2FeaturePipeline’ has no member named ‘SetCmvnState’
feature_pipeline.SetCmvnState(*(filter->cmvn_state));
^
gstkaldinnet2onlinedecoder.cc:1559:49: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘decodable_info_nnet3’
*(filter->decodable_info_nnet3),
^
gstkaldinnet2onlinedecoder.cc:1569:44: error: ‘kaldi::Gstkaldinnet2onlinedecoder’ has no member named ‘nnet3_decodable_opts’
int32 frame_subsampling_factor = filter->nnet3_decodable_opts->frame_subsampling_factor;
^
gstkaldinnet2onlinedecoder.cc:1573:13: error: ‘class kaldi::SingleUtteranceNnet3Decoder’ has no member named ‘InitDecoding’
decoder.InitDecoding(frame_offset);
^
gstkaldinnet2onlinedecoder,谁搞过,kaldi+gstream,做在线语音识别,自己编译好像发现gstkaldinnet2onlinedecoder和kaldi的online2里代码不兼容,有知道的说下啊,谢谢
确实是代码旧了,从国内镜像网站上下载的kaldi就可以。有so出现。
Mkl下载时握手不成功,用alts(模糊)代替。