0

I've been struggling with Sphinx for a while now and all of the sudden I keep getting this assertion error, which reads as follows:

Exception in thread "main" java.lang.AssertionError
at edu.cmu.sphinx.result.Lattice.<init>(Lattice.java:170)
at edu.cmu.sphinx.api.SpeechResult.<init>(SpeechResult.java:43)
at edu.cmu.sphinx.api.AbstractSpeechRecognizer.getResult(AbstractSpeechRecognizer.java:51)
at AudioRecognizer.getAudioFileResult(AudioRecognizer.java:38)
at AudioRecognizer.processAudioFile(AudioRecognizer.java:45)
at AudioRecognizer.main(AudioRecognizer.java:115)

The line in my code it's struggling with is

    SpeechResult result = recognizer.getResult();

The line in Sphinx's source code it's struggling with is

    assert token != null && token.getWord().isSentenceEndWord();

It did not have a problem with this before. The only thing I changed was that I removed the language model and used a grammar (for which I added in setGrammarPath(true), setGrammarName() and setGrammarPath() with appropriate arguments of course), and when I trace it through debug on Eclipse token doesn't seem to be null. The audio file it's looking at is literally just someone saying "span."

Does anyone have any insight into this problem? I'm at a complete loss as to why this is no longer working.

jww
  • 97,681
  • 90
  • 411
  • 885
Ryan Faulhaber
  • 76
  • 1
  • 3
  • 7

0 Answers0