Sphinx4 is a Java speech recognition library that uses the Java Speech API engine. It requires four attributes to be set for recognition: an acoustic model, dictionary, grammar or language model, and audio source. The acoustic model represents sound patterns, the language model is a word probability distribution, and grammars precisely define possible inputs. Important Sphinx4 packages provide frontend utilities, recognition classes, result representations, and property management.