gooofy / zamia-speech

Open tools and data for cloudless automatic speech recognition
GNU Lesser General Public License v3.0
443 stars 84 forks source link

Unable to do Kaldi online decoding with kaldi-generic-en-tdnn_sp-r20190227 #58

Closed YoavRamon closed 5 years ago

YoavRamon commented 5 years ago

I Downloaded kaldi-generic-en-tdnn_sp-r20190227 and tried to use it with the kaldi online decoders.
I used the following arguments:

./online2-tcp-nnet3-decode-faster --feature-type=mfcc --min-active=200 --max-active=8000 \
--beam=13.0 --lattice-beam=6.0 --acoustic-scale=1.0 --frames-per-chunk=51 \
--frame-subsampling-factor=3 --endpoint.silence-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15 --ivector-silence-weighting.silence-weight=1e-3 --ivector-silence-weighting.silence-phones=1:2:3:4:5:6:7:8:9:10:11:12:13:14:15 \
--ivector-extraction-config=/home/models/kaldi-generic-en-tdnn_sp-r20190227/ivectors_test_hires/conf/ivector_extractor.conf --samp-freq=16000 --mfcc-config=/home/models/kaldi-generic-en-tdnn_sp-r20190227/conf/mfcc.conf \
/home/models/kaldi-generic-en-tdnn_sp-r20190227/model/final.mdl /home/models/kaldi-generic-en-tdnn_sp-r20190227/model/graph/HCLG.fst /home/models/kaldi-generic-en-tdnn_sp-r20190227/model/graph/words.txt

And I keep getting the following error: ERROR (online2-tcp-nnet3-decode-faster[5.5.313~1-203c]:OnlineTransform():online-feature.cc:521) Dimension mismatch: source features have dimension 91 and LDA #cols is 280 The same arguments work fine with all the other models I use (not from Zamia). Do you know why that happens? do you have the online.conf that you use with kaldi?

gooofy commented 5 years ago

I use the models in py-kaldi-asr, check out this source file for config parameters:

https://github.com/gooofy/py-kaldi-asr/blob/master/kaldiasr/nnet3.pyx

other than that it might be worth a try contacting the kaldi help mailing list for further suggestions.

dpny518 commented 5 years ago

First convert the downloaded zamia model to online, when you doing that it makes the conf file for you steps/online/nnet3/prepare_online_decoding.sh

ckobus commented 5 years ago

I am facing the same issue as you @YoavRamon. Could you solve the problem?

ckobus commented 5 years ago

I found the solution in https://github.com/alumae/kaldi-gstreamer-server/issues/140 You have to use mfcc_hires.conf instead of mfcc.conf

gooofy commented 5 years ago

cool, thanks for the feedback! :)