After reconfirming how it was supposed to be working, I’ve come to the conclusion it’s unable to parse the grammar file.
I was trying to use the example JSGF example from CMUSphinx’s page, which is
public = ;
= /10/ open |/2/ close |/1/ delete |/1/ move;
= [the | a] (window | file | menu);
= (please | kindly | could you | oh mighty computer) *;
= [ please | thanks | thank you ];
and it was throwing an index out of bounds exception. If I change it to a more direct set of phrases
OPEN THE WINDOW |
CLOSE THE WINDOW |
DELETE THE WINDOW |
DELETE THE FILE |
CLOSE THE FILE;
It seems to work fine. Honestly though, I can probably get away with simple phrase detection like this for this project.
EDIT: the tags were parsing out of the CMU code here, but the example on the page still lists it.