Sphinx4 is the Java library available in OSS , so you can use it like any library.
If your project uses maven / gradle, add the repository to your project configuration, then add the dependency on two packages - core-sphinx4 and sphinx4-data. The former is the main library, the latter is required if you want to learn American English. Then just start writing code.
If you want to rely on jar files, just download the sphinx4-core and sphinx4-data files from the repository and add them as a project dependency, and then start writing code.
If you want to modify or develop your own sphinx4, install Gradle support in your IDE and then import the latest sphinx4 sources as Gradle.
For more information and links, see the tutorial.
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
source share