In recent days I have been reading alot about modifying the HelloWorld demo file & adding new words in it of our own choice. But I am encountering a serious problem whic
You made it wrong from the beginning, you should have used updated version sphinx4-5prealpha which is much easier to use. You should not repackage any sphinx4 jars. Here are the steps you need to make to create an application using sphinx4 and recognizing a custom grammar:
Setup a new java application in your IDE
Add sphinx4 dependency with jars or with maven/gradle.
Write grammar as requested and add it into application resources.
Write dictionary as requested and add it to application resources.
Copy SpeechRecognizer code from tutorial and modify path according to the location of the resources you created.
For more details, see sphinx4 tutorial