Menu

error in sphinx4-5prealpha

annnca
2014-05-08
2014-09-09
  • annnca

    annnca - 2014-05-08

    i download sphinx4-5prealpha.rar,but when i tried to build the project in netbeans i received an error in the package edu.cmu.sphinx.speakid(classes SpeakerCluster.java and SpeakerIdentification.java).
    How to fix it?

     
  • Nickolay V. Shmyrev

    You need to add libraries from the lib folder of sphinx4 to class path (in particular commons-math.jar)

    When you report about errors please learn to provide full and exact error text and the additional information about your problem. Remember, the more information you provide the faster you get an answer.

     
  • annnca

    annnca - 2014-05-08

    the error is that package org.apache.commons.math3.linear.Array2DRowRealMatrix doesn`t exist and it is import in SpeakerCluster.java

     
    • Nickolay V. Shmyrev

      This package is defined in commons-math.jar, you need to add it to class path in the project properties.

       
  • annnca

    annnca - 2014-05-12

    i want to use sphinx4-5prealpha in one of my project,i configured in this way:
    configuration.setAcousticModelPath("result_cD_128gmm_100_128");
    configuration.setDictionaryPath("models/dic/rodigits.dic");
    configuration.setGrammarPath("models/language/rodigits.jsgf");
    but i received the error
    Caused by: java.lang.RuntimeException: Allocation of search manager resources failed
    Caused by: java.io.FileNotFoundException: (The system cannot find the path specified)

    What is wrong in my configuration?

     
  • Nickolay V. Shmyrev

    What is wrong in my configuration?

    The paths you specified are incorrect. Specify correct path. If you are not sure what relative path is, specify the full absolute path.

     
  • annnca

    annnca - 2014-05-12

    but i use the right format for paths?it`s what the method is asking?
    If i use the absolute path and i write like like:
    configuration.setDictionaryPath("D:\NetBeansProjects\rodigits\models\dic\rodigits.dic) i received:
    Caused by: Property exception component:'dictionary' property:'dictionaryPath' - Bad URL D:\NetBeansProjects\rodigits\models\dic\rodigits.dicunknown protocol: d
    edu.cmu.sphinx.util.props.InternalConfigurationException: Bad URL D:\NetBeansProjects\rodigits\models\dic\rodigits.dicunknown protocol: d

     
  • Nickolay V. Shmyrev

    but i use the right format for paths?it`s what the method is asking?

    Yes, format is correct, the path itself is wrong

    configuration.setDictionaryPath("D:\NetBeansProjects\rodigits\models\dic\rodigits.dic) i received:

    Absolute URLs in java for windows must start with file://

    file:///D:/NetBeansProjects/rodigits/models/dic/rodigits.dic
    

    See for details http://en.wikipedia.org/wiki/File_URI_scheme

     
  • Maximilian Eberl

    I had a similiar problem.
    It's my stupidity (may be Yours too) plus an unclear netbeans GUI bug/feature.

    The problem was: in the netbeans GUI
    In package edu.cmu.sphinx.speakerid
    in the File SpeakerCluster.java
    the import org.apache.commons.math3.linear.Array2DRowRealMatrix
    showed an error:
    package org.apache.commons.math3.linear does not exist

    No real problem, because the project builds and runs fine.
    Just the looks. (As with me - the same problem: just the looks!)

    I changed the source Class Path settings in Project Properties by adding the jar, but nothing happend.

    What was the problem?

    When You open Project-rightclick-Project Properties - Java Sources Classpath the box offers You
    Classpath settings for all subprojects!!
    The select box 'Source Package Folders' gives You all subprojects as options.
    It's not a text field, it's a dropdown list!
    Navigate in this select box to the subproject where the problem lives.
    So if netbeans says
    the package org.apache.commons.math3.linear does not exist
    in a file in subproject sphinx4
    You MUST select this source folder in the select box and ad the library here!

    (Well, I am an eclipse and Idea/Webstorm guy, not a netbeans guy.)

     

Log in to post a comment.

MongoDB Logo MongoDB