I am running java 1.4.2 on Mac OS 10.3.4. I put all the unzip files in Library/Java/Extensions
when I try to this command
java -Xmx312m -jar HelloWorld.jar
to run the demo HelloWorld I get this message
Loading...
Problem configuring HelloWorld: Property Exception component:'jsgfGrammar' property:'grammarLocation' - Can't locate resource:/demo.sphinx.helloworld.HelloWorld
Property Exception component:'jsgfGrammar' property:'grammarLocation' - Can't locate resource:/demo.sphinx.helloworld.HelloWorld
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getResource(ValidatingPropertySheet.java:372)
at edu.cmu.sphinx.jsapi.JSGFGrammar.newProperties(JSGFGrammar.java:272)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:248)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProperties(SimpleBreadthFirstSearchManager.java:180)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:71)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:93)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at demo.sphinx.helloworld.HelloWorld.main(HelloWorld.java:49)
Could someone please help me get this up and running on OSX.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
BTW, I do nearly all my development on my Mac PowerBook G4 (OS X 10.3.5). You really do not need to copy the jar files to your system directories (e.g., Library/Java/Extensions). Instead, you can keep them in a local directory and rely on the Java classpath to find things. To reduce the complexity of needing to set up a long command line specifying where to find things, we added a classpath reference inside the jar files.
Hope this helps,
Will
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am running java 1.4.2 on Mac OS 10.3.4. I put all the unzip files in Library/Java/Extensions
when I try to this command
java -Xmx312m -jar HelloWorld.jar
to run the demo HelloWorld I get this message
Loading...
Problem configuring HelloWorld: Property Exception component:'jsgfGrammar' property:'grammarLocation' - Can't locate resource:/demo.sphinx.helloworld.HelloWorld
Property Exception component:'jsgfGrammar' property:'grammarLocation' - Can't locate resource:/demo.sphinx.helloworld.HelloWorld
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getResource(ValidatingPropertySheet.java:372)
at edu.cmu.sphinx.jsapi.JSGFGrammar.newProperties(JSGFGrammar.java:272)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:248)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProperties(SimpleBreadthFirstSearchManager.java:180)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:71)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponent(ValidatingPropertySheet.java:403)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:93)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at demo.sphinx.helloworld.HelloWorld.main(HelloWorld.java:49)
Could someone please help me get this up and running on OSX.
Thanks.
Hi:
The issue you are seeing is that you did not extract the jsapi.jar file:
http://cmusphinx.sourceforge.net/sphinx4/doc/jsapi_setup.html
BTW, I do nearly all my development on my Mac PowerBook G4 (OS X 10.3.5). You really do not need to copy the jar files to your system directories (e.g., Library/Java/Extensions). Instead, you can keep them in a local directory and rely on the Java classpath to find things. To reduce the complexity of needing to set up a long command line specifying where to find things, we added a classpath reference inside the jar files.
Hope this helps,
Will
Ahhh--
I had been forgetting the chmod command, thanks. Also I moved to local dir. Thanks.
Jeremy