flashlight / wav2letter

Facebook AI Research's Automatic Speech Recognition Toolkit
https://github.com/facebookresearch/wav2letter/wiki
Other
6.39k stars 1.01k forks source link

Decoding Error #76

Closed ambigus9 closed 6 years ago

ambigus9 commented 6 years ago

Hi, When I try to run

 luajit /wav2letter/decode.lua models dev-clean -show -letters /librispeech-proc/letters-rep.lst  -words /dict.lst -lm /3-gram.pruned.3e-7.arpa -lmweight 3.1639 -beamsize 25000 
-beamscore 40 -nthread 10 -smearing max -show

I got this error:

PARAMETERS: -lmweight 3.163900 -wordscore 0.000000 -unkscore -inf -beamsize 25000.000000 -beamscore 40.000000 -silweight 0.000000

[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[loading /dict.lst]
[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
**********[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
***************************[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
******[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
*****************[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
***************************************************************************************************************[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
********************[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
*******************[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
********************************************************************************************[200000 tokens found]
[loading /librispeech-proc/letters-rep.lst]
[118 letters found]
Loading the LM will be faster if you build a binary file.
Reading /3-gram.pruned.3e-7.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
***********************************************************
*************************************
*****************************************************************************************************
********
******************
***
******************************************************************************
******
***
[Lexicon Trie memory usage: 436.61 Mb]
[slice 6/10 going from 1356 to 1626]
luajit: /root/usr/share/lua/5.1/threads/threads.lua:183: [thread 7 callback] bad argument #1 to '?' (empty tensor at /tmp/luarocks_torch-scm-1-7348/torch7/generic/Tensor.c:911)
stack traceback:
    [C]: at 0x7f6d732ddb60
    [C]: in function '__index'
    /root/usr/share/lua/5.1/wav2letter/runtime/decoder.lua:131: in function 'decoder'
    /wav2letter/decode.lua:127: in function </wav2letter/decode.lua:48>
    [C]: in function 'xpcall'
    /root/usr/share/lua/5.1/threads/threads.lua:234: in function 'callback'
    /root/usr/share/lua/5.1/threads/queue.lua:65: in function </root/usr/share/lua/5.1/threads/queue.lua:41>
    [C]: in function 'pcall'
    /root/usr/share/lua/5.1/threads/queue.lua:40: in function 'dojob'
    [string "  local Queue = require 'threads.queue'..."]:15: in main chunk
stack traceback:
    [C]: in function 'error'
    /root/usr/share/lua/5.1/threads/threads.lua:183: in function 'dojob'
    /root/usr/share/lua/5.1/threads/threads.lua:264: in function 'synchronize'
    /wav2letter/decode.lua:210: in main chunk
    [C]: at 0x00404ab0

Thanks for any help.

vineelpratap commented 6 years ago

Hi, is this on a custom dataset or original dataset ?

ambigus9 commented 6 years ago

Original dataset.

xuqiantong commented 6 years ago

@ambigus9 It seems like scores is an empty tensor at wav2letter/runtime/decoder.lua:131. Can you please check if your input emission/transition matrices are valid (probably above /wav2letter/decode.lua:127)?

ambigus9 commented 6 years ago

@xuqiantong and @vineelpratap It was my mistake on installation process. I was using "luarocks install cutorch" instead of "luarocks install torch". When I use "luarocks install torch" everything works fine.