 <p>The approach is ok.</p> <p>If you do not have enough memory for JVM, you can increase it with -Xmx option</p> <p>For the accurate retrieval it's better to create a unigram language model with frequencies of the words, not just a plain list. See for details</p> <p><a href="http://cmusphinx.sourceforge.net/wiki/tutoriallm" rel="nofollow">http://cmusphinx.sourceforge.net/wiki/tutoriallm</a></p> <p>For the best accuracy it's better to use latest high-level API, see for details</p> <p><a href="http://cmusphinx.sourceforge.net/wiki/sphinx4" rel="nofollow">http://cmusphinx.sourceforge.net/wiki/sphinx4</a></p>