Menu

Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz

Tiberius
2014-06-15
2015-01-30
  • Tiberius

    Tiberius - 2014-06-15

    Hi All,

    I'm starting to learn about Sphinx, and it seems like a great tool! That being said, I'm having a bit of trouble getting the demos to work. Forgive me, I'm a bit new to Java, so maybe my issue is a no-brainer for you guys.

    Here's what I've done so far:
    1) Download sphinx4-5prealpha-src.zip from http://cmusphinx.sourceforge.net/wiki/download/
    2) Unzip it
    3) Import its .project file into Eclipse
    4) Navigate to sphinx4/src/apps edu.cmu.sphinx.demo.dialog
    5) Right-click Dialog.java and click Run As... Java Application

    This gives me the error:
    Exception in thread "main" Property exception component:'acousticModelLoader' property:'location' - Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz
    edu.cmu.sphinx.util.props.InternalConfigurationException: Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz

    I noticed that though the sphinx4-5prealpha does come with a models directory, it doesn't seem to have anything like "WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz", it only has "wsj" and "wsj_8kHz".

    So I have a lot of questions, and here they are:
    1) Did I do something wrong? Is there something I'm missing?
    2) Are there more files I need to download in addition to sphinx4-5prealpha-src.zip?
    3) In Java, what is this "reource:/...etc..." that I'm seeing? What defines a resource directory?
    4) Because it's a prealpha, would it be safer for me to use something like sphinx4-1.0beta6-bin.zip?

     
  • Nickolay V. Shmyrev

    Hello Tiberius

    Nice you are trying sphinx4.

    1) Did I do something wrong? Is there something I'm missing?

    Before starting apps you need to run ant in the top folder to copy model files into bld folder under proper names.

    2) Are there more files I need to download in addition to sphinx4-5prealpha-src.zip?

    No.

    3) In Java, what is this "reource:/...etc..." that I'm seeing? What defines a resource directory?

    Resources are files relative to classpath.

    4) Because it's a prealpha, would it be safer for me to use something like sphinx4-1.0beta6-bin.zip?

    No.

     

    Last edit: Nickolay V. Shmyrev 2014-06-15
  • pythonsss

    pythonsss - 2014-06-19

    Nickolay,

    I'm having the same problem. I was able to get the jars from the repository via maven. When I try to run the build.xml, I get a "BUILD FAILED" class not found. I'm new to Java and am just so confused on this setup. Any suggestions? Here's a screen shot:

    http://imgur.com/RKWvCpW

     
  • Nickolay V. Shmyrev

    For those who wonder what this issue is about, the latest sphinx4 has reworked the layout of data files a bit. You need

    1) Use latest sphinx4-5prealpha as described in tutorial

    http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4

    2) Properly specify the resource path as in sphinx4 samples. In latest sphinx4 the paths should look like this:

    Configuration configuration = new Configuration();

        configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");
        configuration.setDictionaryPath("resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict");
        configuration.setLanguageModelPath("resource:/edu/cmu/sphinx/models/language/en-us.lm.dmp");
    

    Resource here reference an URL in classpath. If you use files, you can use file: URL

     

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.