在我的一个项目中,我一直在使用Voce的C ++ api进行语音识别。到目前为止,我已经能够编译Voce提供的一个名为 recognitionTest 的示例应用程序的C ++版本(在voce-0.9.1中的samples目录下提供)。
但是,当我尝试运行recognitionTest.exe时,我遇到了IndexOutOfBoundsException(下面提供了控制台输出)。
[Voce] Java virtual machine created
[Voce] Initializing recognizer. This may take some time...
[Voce] Initialization complete
This is a speech recognition test. Speak digits from 0-9 into the microphone. Speak 'quit' to quit.
Exception in thread "Recognition thread" java.lang.IndexOutOfBoundsException: Index: 110,Size: 109
at java.util.SubList.rangeCheck(Unknown Source)
at java.util.SubList.get(Unknown Source)
at edu.cmu.sphinx.decoder.scorer.ScoreableJob.getFirst(ThreadedAcousticScorer.java:516)
at edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer.scoreScoreables(ThreadedAcousticScorer.java:310)
at edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer.calculateScores(ThreadedAcousticScorer.java:276)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.scoreTokens(SimpleBreadthFirstSearchManager.java:337)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.recognize(SimpleBreadthFirstSearchManager.java:258)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.recognize(SimpleBreadthFirstSearchManager.java:226)
at edu.cmu.sphinx.decoder.Decoder.decode(Decoder.java:94)
at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:116)
at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:135)
at voce.SpeechRecognizer.run(SpeechRecognizer.java:129)
at java.lang.Thread.run(Unknown Source)
我正在使用Windows 8和32位版本的java 1.5。
问题:之前有人遇到过类似的错误吗?底层的cmusphinx库似乎抛出了异常。所以,我无法调试这个问题。
非常感谢任何帮助!
如果有任何其他信息有助于解决问题,请告诉我。
提前致谢!