Menu

Changing *.gram file

Help
spoljo
2007-03-08
2012-09-22
  • spoljo

    spoljo - 2007-03-08

    Hello !

    I am a new user of Sphinx 4 and I have a question regarding HelloWorld demo. If I want another name to be recognized in HelloWorld demo, is it enough only to add new name in the .gram file or is there something else that must be done ? I have added name "Peter" in the .gram file but it was not recognized, but all other default names were recognized. Please help me! Thank you in advanced !!!

    Peter

     
    • Holger Brandl

      Holger Brandl - 2007-03-08

      Hi Peter,

      just adding new words to the .gram is not enough. Because the gram-file is loaded from the HelloWorld.jar you need to run the appropriate make task again (the ant task in your HelloWorld-task would be compile_sphinx_helloworld from the demo.xml build-file).

      Regards,

      Holger

       
    • Nagendra Kumar Goel

      there is a manifest file in every demo and maybe it needs to be edited when you make a change to grammar to point to the new grammar.

       
      • Holger Brandl

        Holger Brandl - 2007-03-08

        Hi,

        it won't help to change the manifest, because it just defines which class to use when you start the demo using "java -jar HelloWorld.jar"

        As already said, you need to rebuild the HelloWorld.jar by using the demo.xml ant-file and your changes to the grammar will be reflected in your recognition results.

        Best regards,
        Holger

         
    • spoljo

      spoljo - 2007-03-08

      Hello !

      Of course, I rebuild the demo after the change in HelloWorld.java and *.gram file, but it was the same problem. Is maybe there some file with predefined words, which are recognized by software ?

      Best regards,

      Peter

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.