cmusphinx / sphinx4

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

NullPointerException in Lattice.java #68

Closed tbook closed 7 years ago

tbook commented 7 years ago

I've observed the following NullPointerException when calling GetWords:

java.lang.NullPointerException
    at edu.cmu.sphinx.result.Lattice.getWordResultPath(Lattice.java:1062)
    at edu.cmu.sphinx.api.SpeechResult.getWords(SpeechResult.java:52)
    ...

It looks like node.getWord() sometimes returns null. I haven't dug deep enough to see if that is intentional or not.

Using 5prealpha-SNAPSHOT from oss.sonatype.org.

nshmyrev commented 7 years ago

Hi

Thanks for the report. Could you please provide at least some information to reproduce your problem?

nshmyrev commented 7 years ago

No information provided

Thorn1089 commented 5 years ago

I've observed the same issue. It happens when I call getWords() on a SpeechResult.

For some WAV files, it's fine and I get the words, confidence, etc. For others, it crashes.

It seems to be the same issue as: https://sourceforge.net/p/cmusphinx/discussion/sphinx4/thread/de04f6b3/