Menu

edu.cmu.sphinx.jsapi.JSGFGrammar

Help
Joe Hudson
2009-02-22
2012-09-22
  • Joe Hudson

    Joe Hudson - 2009-02-22

    Hello,

    I am new to Sphinx4 (1.0beta2) and am trying to run a test class (which is pretty much the same code as the hellodigits demo class.

    The problem is that I receive the following error:

    Property Exception component:'flatLinguist' property:'grammar' - mandatory property is not set!
    edu.cmu.sphinx.util.props.InternalConfigurationException
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:283)
    at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:186)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:421)
    ...

    I see the following message in System.out:

    class not found !java.lang.ClassNotFoundException: edu.cmu.sphinx.jsapi.JSGFGrammar

    I can't seem to figure out where to find this class. It is not in the sphinx4.jar or any other jars that are in the sphinx4 distribution as far as I can tell. I would really appreciate any help that might be offered. Thanks.

    Regards,

    Joe

     
    • Joe Hudson

      Joe Hudson - 2009-02-24

      Thank you very much for your reply.

      I understand that the class file is missing but I guess what I was asking is if the edu.cmu.sphinx.jsapi package was part of the normal distribution as that package is absent from the one I downloaded.

      Anyway, I'll get that package from the repository and build it locally. Again, thank you very much for your help.

      Regards,

      Joe

       
      • Nickolay V. Shmyrev

        This class is the part of distribution as well. See sphinx4.jar

         
    • eliasmajic

      eliasmajic - 2009-02-23

      well if hellodigits works, then this should too. Below is part of the config.xml file that is associated with the error.
      It looks like it cant find that particular class that is being told to use in the config.xml.

      <component name="flatLinguist" 
                  type="edu.cmu.sphinx.linguist.flat.FlatLinguist">
          <property name="grammar" value="jsgfGrammar"/>
      </component>
      

      <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar">
      </component>
      The files are there for me :

      /home/eli/nlp/sphinx4/src/research/edu/cmu/sphinx/jsapi/JSGFGrammar.java
      /home/eli/nlp/sphinx4/bin/edu/cmu/sphinx/jsapi/JSGFGrammar.class

      Look in the repository and get it if its still not there. Hope this helps.

       
  • S Zehnder

    S Zehnder - 2009-09-14

    I'm seeing the same thing in beta 3 on Mac OS X running Snow Leopard.

     
  • Jeremie Papon

    Jeremie Papon - 2009-11-17

    You must unpack jsapi.jar BEFORE you use ant to build everything.

    It could also just be something screwy with the downloadable package... I used
    the version off the depository and it fixed the problem.

     

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.