1

I created a project with sphinx & cloudgarden.But when i run the rpoject it gives an error from the sphinx part as below

Exception in thread "Thread-20" java.lang.SecurityException: class "edu.cmu.sphinx.util.props.ConfigurationManagerUtils"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668)
at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at edu.cmu.sphinx.api.Context.<init>(Context.java:59)
at edu.cmu.sphinx.api.Context.<init>(Context.java:45)
at edu.cmu.sphinx.api.AbstractSpeechRecognizer.<init>(AbstractSpeechRecognizer.java:44)
at edu.cmu.sphinx.api.LiveSpeechRecognizer.<init>(LiveSpeechRecognizer.java:34)
at hbsn.HBSN.Sphinx(HBSN.java:275)
at hbsn.HBSN$2.run(HBSN.java:205)

and this is the code for sphinx

public static Configuration configuration;
public static LiveSpeechRecognizer recognize;
public static SpeechResult result;
public static String Sphinx_Result;

public static void Sphinx() throws InterruptedException{

     try {

        configuration = new edu.cmu.sphinx.api.Configuration();
        configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");
        configuration.setDictionaryPath("file:C:/HBSN/Dictioanary-1000.dic");
        configuration.setLanguageModelPath("file:C:/HBSN/Language Model-1000.lm");

        configuration.setUseGrammar(false);
        recognize = new LiveSpeechRecognizer(configuration);
        recognize.startRecognition(true);

        while ((result = recognize.getResult()) != null) {

            Sphinx_Result = result.getHypothesis();

        }

        recognize.stopRecognition();

    } catch (IOException e) {

       main.Error("Error In Sphinx", " sphinx speech recognition unit not working");

    }  


}

used APIs are

  • sphinx4-core-1.0.0.jar

  • sphinx4-data-1.0.0.jar

How can i resolve this issue.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87

1 Answers1

0

You are trying to use compromised jars. You can get latest jars from official website. They should have version 5prealpha, not 1.0.0.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
  • Hi Nikolay,I tried it.Even it gives the same error. – Hasitha Buddika Oct 14 '17 at 08:24
  • I do not think you understand what is going on and update the project properly. You can consult for details https://stackoverflow.com/questions/2877262/java-securityexception-signer-information-does-not-match – Nikolay Shmyrev Oct 14 '17 at 13:12
  • I created another project with only Sphinx part with the same APIs & the same code.It works perfectly.Only this project gives me this error.If signatures are not matching , how is the second project runs without any errors – Hasitha Buddika Oct 15 '17 at 05:37
  • Most likely you still link old corrupted jars in the first project. – Nikolay Shmyrev Oct 16 '17 at 08:03
  • In both projects , I used the same jar files.That's why I couldn't find the exact cause of the error – Hasitha Buddika Oct 16 '17 at 10:19