cmusphinx / sphinx4

Pure Java speech recognition library
cmusphinx.sourceforge.net
Other
1.4k stars 586 forks source link

ArrayIndexOutOfBoundsException BinaryLoader.readWords sphinx4 #66

Closed ashGHub closed 7 years ago

ashGHub commented 7 years ago

The language model was build by using Kaldi tool kit. I used it to train the continuous acoustic model using Sphinx5prealpha release on Linux Ubuntu 14. Finally, I got Sentence error rate 78% and word error rate 17% with out fixing any error and warning shown during the training period.

When I was about to use the trained model in simple application as shown on the CMU sphinx tutorial the following error showed up


16:12:52.663 INFO trieNgramModel Loading n-gram language model from:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 51361
at edu.cmu.sphinx.linguist.language.ngram.trie.BinaryLoader.readWords(BinaryLoader.java:151)
at edu.cmu.sphinx.linguist.language.ngram.trie.NgramTrieModel.allocate(NgramTrieModel.java:233)
at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.allocate(LexTreeLinguist.java:334)
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.allocate(WordPruningBreadthFirstSearchManager.java:243)
at edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:103)
at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:164)
at edu.cmu.sphinx.api.StreamSpeechRecognizer.startRecognition(StreamSpeechRecognizer.java:52)
at edu.cmu.sphinx.api.StreamSpeechRecognizer.startRecognition(StreamSpeechRecognizer.java:39)
at ASR.main(ASR.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

The file I used for the java application is this

Thanks in advance for your help.

ashGHub commented 7 years ago

test audio file test.zip

nshmyrev commented 7 years ago

Already reported at https://sourceforge.net/p/cmusphinx/bugs/464/