I trained my own acoustic model for some words in Spanish Languaje.
My OS is Ubuntu Hoary
I used Sphinx4 (nightly) to create a simple app. The configuration files and the java one are based on the files tha Sphinx4 contains (HelloWord, HelloDigits, etc..). I could create the .jar file but I get an error when trying to execute
sphinx4$ java -jar bin/test.jar
Problemas configurando test: Property Exception component:'recognizer' property:'monitors' - Can't instantiate: accuracyTracker
Property Exception component:'recognizer' property:'monitors' - Can't instantiate: accuracyTracker
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponentList(ValidatingPropertySheet.java:469)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:94)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at demo.sphinx.test.test.main(test.java:27)
I believe you either need to set your CLASSPATH to point to the appropriate Sphinx4 jar files, or you need to make sure your test.jar fle's manifest has the appropriate Class-Path setting (see the HelloWorld one for an example).
Hope this helps,
Will
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked your second suggestion: the test.jar file has a META-INF folder wich contains a file named MANIFES.MF, the Class-Phat seems to be fine (the only parameter that changes is the reference to the acoustic model, wich is logic).
But I don't know how to set my CLASSPATH. Does it change for two diferent applications?, I mean, it is possible to run the HellowDigits.jar, but not my test.jar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2) The manifest uses a relative path name, and requires your jar file to be in a directory that's parallel to the lib directory that contains the S4 jar files. Perhaps your test.jar is not in such a location.
Hi
I trained my own acoustic model for some words in Spanish Languaje.
My OS is Ubuntu Hoary
I used Sphinx4 (nightly) to create a simple app. The configuration files and the java one are based on the files tha Sphinx4 contains (HelloWord, HelloDigits, etc..). I could create the .jar file but I get an error when trying to execute
sphinx4$ java -jar bin/test.jar
Problemas configurando test: Property Exception component:'recognizer' property:'monitors' - Can't instantiate: accuracyTracker
Property Exception component:'recognizer' property:'monitors' - Can't instantiate: accuracyTracker
at edu.cmu.sphinx.util.props.ValidatingPropertySheet.getComponentList(ValidatingPropertySheet.java:469)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:94)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:214)
at demo.sphinx.test.test.main(test.java:27)
the line 27 of my .java is
url = prueba.class.getResource("test.config.xml");
Now, the HelloDigits has the same instruccion and its config file is similar, but it doesn't produce any error...
What could be wonrg?
If this information is not enough, just tell me.
The Class-Path is correct, and the directories too.
I solved the problem changing the Sphinx4 nightly build by
the beta version.
Now my app is running without any trouble.
I'm not sure if I did someting wrong in the nigthly build to provoke the error, or if its a problem of the version.
Thanks.
Hi:
I believe you either need to set your CLASSPATH to point to the appropriate Sphinx4 jar files, or you need to make sure your test.jar fle's manifest has the appropriate Class-Path setting (see the HelloWorld one for an example).
Hope this helps,
Will
Thanks for answer.
I checked your second suggestion: the test.jar file has a META-INF folder wich contains a file named MANIFES.MF, the Class-Phat seems to be fine (the only parameter that changes is the reference to the acoustic model, wich is logic).
But I don't know how to set my CLASSPATH. Does it change for two diferent applications?, I mean, it is possible to run the HellowDigits.jar, but not my test.jar
Hmm..perhaps check the following:
1) Is something misspelled in the manifest? The "Class-Path" line should look something like:
Class-Path: ../lib/sphinx4.jar ../lib/jsapi.jar ../lib/WSJ_8gau_13dCep_16k_40mel
_130Hz_6800Hz.jar
2) The manifest uses a relative path name, and requires your jar file to be in a directory that's parallel to the lib directory that contains the S4 jar files. Perhaps your test.jar is not in such a location.
CLASSPATH information can be found here:
http://wiki.java.net/bin/view/Javapedia/ClassPath
Will