Andi Maier
Andi Maier

Reputation: 1034

Kaldi - Mini librispeech - decode own file

I have started to work with Kaldi and have managed to train the mini librispeech files which took quite a while without any GPU.

Now I have got a small WAV file and I would need to figure out how to decode this file with Kaldi. Which decode file do I need to use?

Would be great to get any information!

Cheers, Andi

Upvotes: 0

Views: 1291

Answers (1)

Nikolay Shmyrev
Nikolay Shmyrev

Reputation: 25220

To decode a single file you put it name inside scp file decode.scp like this:

decoder-test decoder-test.wav

Then the decoding script would look like this:

online2-wav-nnet3-latgen-faster \
      --word-symbol-table=exp/tdnn/graph/words.txt --frame-subsampling-factor=3 --frames-per-chunk=51 \
      --acoustic-scale=1.0 --beam=12.0 --lattice-beam=6.0 --max-active=10000 \
      --config=exp/tdnn/conf/online.conf \
      exp/tdnn/final.mdl exp/tdnn/graph/HCLG.fst ark:decoder-test.utt2spk scp:decoder-test.scp ark:- |
    lattice-lmrescore --lm-scale=-1.0 ark:- 'fstproject --project_output=true data/lang_test_rescore/G.fst |' ark:- |
    lattice-lmrescore-const-arpa ark:- data/lang_test_rescore/G.carpa ark:- |
    lattice-align-words data/lang_test_rescore/phones/word_boundary.int exp/tdnn/final.mdl ark:- ark:- |
    lattice-to-ctm-conf --frame-shift=0.03 --acoustic-scale=0.08333 ark:- - |
    local/int2sym.pl -f 5 data/lang_test_rescore/words.txt - -

You can also try kaldi-gstreamer or py-kaldi-asr for simplified interface to decoding.

Upvotes: 0

Related Questions