I am currently trying to make my java code (using eclipse) perform some function if a certain thing is said. I am using the Sphinx4 libraries and this is what I currently ha
You can do that but the only thing is that you need to enable OOG spotting in sphinx4. Basically take any sphinx4 grammar example and enable OOG according to this wiki page in config file:
....
...
After that it will return you
word as a result if just random word is recorded and will return you a key phrase if the word from your grammar is recorded.
You need to tune outOfGrammar probability to get a reliable detection. For more details see
http://cmusphinx.sourceforge.net/wiki/sphinx4:rejectionhandling