I use Pocketsphinx in my Android app. I have a relatively small set of commands to be recognized independently, so I ended up using a keyword search from a file that looks like
You can iterate over segments, each would be a keyword
for (Segment seg : recognizer.getDecoder().seg()) { System.out.println(seg.getWord() + " " + seg.getProb()); }