I was following the recipe in egs/rm/s5/local/online/run_nnet2_wsj_joint.sh and I encountered a problem when extracting egs. I have isolated the error and it is produced by the call:
wav.scp, segment and spk2utt correspond only to one utterance and feature.conf is the normal one for nnet2. Here is the contents of the mfcc.conf used in feature.conf, as I will get back to it later:
LOG (online2-wav-dump-features:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (online2-wav-dump-features:ComputeDerivedVars():ivector-extractor.cc:204) Done.
KALDI_ASSERT: at online2-wav-dump-features:Init:kaldi-vector.cc:167, failed: dim >= 0
Stack trace is:
kaldi::KaldiGetStackTrace()
kaldi::KaldiAssertFailure_(char const*, char const*, int, char const*)
kaldi::Vector<float>::Init(int)
kaldi::Vector<float>::Resize(int, kaldi::MatrixResizeType)
kaldi::ExtractWaveformRemainder(kaldi::VectorBase<float> const&, kaldi::FrameExtractionOptions const&, kaldi::Vector<float>*)
kaldi::Mfcc::ComputeInternal(kaldi::VectorBase<float> const&, kaldi::MelBanks const&, kaldi::Matrix<float>*, kaldi::Vector<float>*) const
kaldi::Mfcc::Compute(kaldi::VectorBase<float> const&, float, kaldi::Matrix<float>*, kaldi::Vector<float>*)
kaldi::OnlineGenericBaseFeature<kaldi::Mfcc>::AcceptWaveform(float, kaldi::VectorBase<float> const&)
kaldi::OnlineNnet2FeaturePipeline::AcceptWaveform(float, kaldi::VectorBase<float> const&)
online2-wav-dump-features(main+0x5ff) [0x600abc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f2d59d11ec5]
online2-wav-dump-features() [0x6003f9]
KALDI_ASSERT: at online2-wav-dump-features:Init:kaldi-vector.cc:167, failed: dim >= 0
Stack trace is:
kaldi::KaldiGetStackTrace()
kaldi::KaldiAssertFailure_(char const*, char const*, int, char const*)
kaldi::Vector<float>::Init(int)
kaldi::Vector<float>::Resize(int, kaldi::MatrixResizeType)
kaldi::ExtractWaveformRemainder(kaldi::VectorBase<float> const&, kaldi::FrameExtractionOptions const&, kaldi::Vector<float>*)
kaldi::Mfcc::ComputeInternal(kaldi::VectorBase<float> const&, kaldi::MelBanks const&, kaldi::Matrix<float>*, kaldi::Vector<float>*) const
kaldi::Mfcc::Compute(kaldi::VectorBase<float> const&, float, kaldi::Matrix<float>*, kaldi::Vector<float>*)
kaldi::OnlineGenericBaseFeature<kaldi::Mfcc>::AcceptWaveform(float, kaldi::VectorBase<float> const&)
kaldi::OnlineNnet2FeaturePipeline::AcceptWaveform(float, kaldi::VectorBase<float> const&)
online2-wav-dump-features(main+0x5ff) [0x600abc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f2d59d11ec5]
online2-wav-dump-features() [0x6003f9]
If I get rid of the "--snip-edges=false" option the command will work normally, but I cannot use this solution as my nnet2 setup uses this option. As the problem seems related to the mfcc extraction in online2-wav-dump-features I tried to manually extract them using the same feature.conf and wav.scp, etc and it worked correctly.
extract-segments scp,p:wav.scp segments ark:- | compute-mfcc-feats --config=mfcc.conf ark:- ark:-
Are these two mfcc extraction the same, if so how do they differ? Is snip-edges=false causing online2-wav-dump-features to expect more audio than it is supposed?