Menu

help me : i am new to sphinx

Help
2009-02-06
2023-04-26
  • Ramki Balakrishnan

    i am doing my project with speech recognition concept. i tried sphinx. but i do not know how to install sphinx in xp. i tried that wave file demo jar file. but the output is unable to access the jar file. thanks in advance

     
    • Kurt Liska

      Kurt Liska - 2009-03-07

      Greetings all,

      I am a marketer, not a programmer/engineer, so please excuse in advance...

      1. where can I find information about Sphinx which is written in layman's language?

      2. where can I discover a listing of existing projects so that I can determine if anyone is already doing what I am interested in?

      3. does anyone know if there are forums which help people like me (marketer/entrepreneur) to find engineer partners?

       
    • Nickolay V. Shmyrev

      > but i do not know how to install sphinx in xp.

      Try to setup sphinx4 in IDE

      http://cmusphinx.sourceforge.net/sphinx4/doc/Eclipse.html

      or there is a similar document for netbeans

       
    • Ramki Balakrishnan

      but in sphinx documentation they mentioned to use cygwin in xp to use the sphinx. tried that also. but i could not run that demos.

       
    • Magdalena Broniecka

      Hi!
      About year ago i was using Sphinx4 and everything worked just fine. Unfortunately i had to reinstall my system and now i'm trying to setup sphinx in NetBeans and i get weird errors. I tried on Vista and XP [on my laptop and PC] with NetBeans ver 6.5, 5.5 and 5.0 on both windows. I have latest java SDK 6.12. and apache-ant-1.7.1. I've downloaded both scr and bin sphinx. Demo jars run in console works fine but i can't build it in NetBeans. I did everything step by step from http://cmusphinx.sourceforge.net/sphinx4/doc/NetBeans.html and when i'm trying to open java file in any demo it has weird erros:
      When i double click on HelloDigits.java the import part is underlined in red and it says that's there is no package about those:

      import edu.cmu.sphinx.frontend.util.Microphone;
      import edu.cmu.sphinx.recognizer.Recognizer;
      import edu.cmu.sphinx.result.Result;
      import edu.cmu.sphinx.util.props.ConfigurationManager;
      import edu.cmu.sphinx.util.props.PropertyException;

      But i have the edu folder imported at the beginning.

      My 1st question is about building sphinx in step 'Select JDK 5 in the Source level field. Click on Next button. This will show Java Sources Classpath tab. ' i have nothing in Java Sources Classpath should i add some files there? [i'm adding jar files to classpath later like tutorial says]
      When i do in NetBeans build.xml-> Run target -> all there are no mistakes.
      So i had an idea i copied build.xml to my HelloDigits folder the package error disappeared but when i do build.xml-> Run target -> all there are more and more mistakes about missing files and folders from edu and linguistic.
      And part in 'Running Sphinx-4 Demos' with editing build.xml is unclear. Perhaps that's the source of my problems.

      Last thing. I actually need only working hellodigits that i can add to my other application so according to FAQ i need only bin version of Sphinx. Maybe it's easier to build in NetBeans, because honestly i give. Last year i did a working dictionary window application and i didn't have any problems like i'm facing now.
      I'll be greatfull for any help and i'm sorry if my english is not correct but i'm not a native.

       
    • Magdalena Broniecka

      I just figured it out! I was editing wrong build.xml file! Now it seems to be working properly. I usually figure things out right after asking for help. I just got new perspective after posting my problem after so many hours spent with code only.
      Anyway perhaps i will need more help in the future with my kind-of-skype with voice-dialing application, because now i need to connect 'telephone part' with dialing numbers.
      Goodnight :)

       
      • Nickolay V. Shmyrev

        > I just figured it out! I was editing wrong build.xml file! Now it seems to be working properly. I usually figure things out right after asking for help. I just got new perspective after posting my problem after so many hours spent with code only.
        Anyway perhaps i will need more help in the future with my kind-of-skype with voice-dialing application, because now i need to connect 'telephone part' with dialing numbers.

        Great everything goes well. If you are a newbie and want to ask questions online, feel free to join #cmusphinx irc channel on freenode.

         
    • Magdalena Broniecka

      I just figured it out! I was editing wrong build.xml file! Now it seems to be working properly. I usually figure things out right after asking for help. I just got new perspective after posting my problem after so many hours spent with code only.
      Anyway perhaps i will need more help in the future with my kind-of-skype with voice-dialing application, because now i need to connect 'telephone part' with dialing numbers.
      Goodnight :)

       
    • Ramki Balakrishnan

      i run the helloworld program in xp with netbeans 4. its working properly.
      but while i run the wavefile program i gives some errors. i modified the bulid.xml file also.

      build.xml file:

      <?xml version="1.0" encoding="UTF-8"?>

      <project basedir="." default="all" name="The hello world demo.">

      <description>
      This file is used to run the hello world demo.

      NOTE: Before running the tests, you must have already built
      the sphinx-4 sources by typing "ant" in the top level
      sphinx4 directory.

      </description>

      &lt;!-- ********************************************************** --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- * Properties common to all tests                         * --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- ********************************************************** --&gt;
      &lt;property name=&quot;top_dir&quot;       value=&quot;../../..&quot;/&gt;
      &lt;property name=&quot;lib_dir&quot;            value=&quot;${top_dir}/lib&quot;/&gt;
      &lt;property name=&quot;build_dir&quot;     value=&quot;${top_dir}/bld&quot;/&gt;
      &lt;property name=&quot;classes_dir&quot;   value=&quot;${build_dir}/classes&quot;/&gt;
      
      &lt;path id=&quot;run.classpath&quot;&gt;
          &lt;pathelement path=&quot;${classes_dir}&quot;/&gt;
      &lt;pathelement location=&quot;${lib_dir}/jsapi.jar&quot;/&gt;
          &lt;pathelement location=&quot;${lib_dir}/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar&quot;/&gt;
      &lt;/path&gt;
      
      &lt;!-- ********************************************************** --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- * The 'none' target.                                     * --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- ********************************************************** --&gt;
      &lt;target name=&quot;none&quot;&gt;
              &lt;echo&gt;Type 'ant -projecthelp' for possible targets.&lt;/echo&gt;
      &lt;/target&gt;
      
      &lt;!-- ********************************************************** --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- * Compile all the test code.                             * --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- ********************************************************** --&gt;
      &lt;target name=&quot;all&quot;
              description=&quot;Compiles all the tests.&quot;&gt;
          &lt;javac debug=&quot;true&quot;
                 source=&quot;1.4&quot;
             deprecation=&quot;true&quot;
             destdir=&quot;${classes_dir}&quot;
             classpath=&quot;${classes_dir}:${lib_dir}/jsapi.jar&quot;
             srcdir=&quot;.&quot;/&gt;
      &lt;/target&gt;
      
      &lt;!-- ********************************************************** --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- * Runs the wave file demo.                             * --&gt;
      &lt;!-- *                                                        * --&gt;
      &lt;!-- ********************************************************** --&gt;
      &lt;target name=&quot;run&quot;
          description=&quot;Runs the wave file demo.&quot;
          depends=&quot;all&quot;&gt;
          &lt;java classname=&quot;demo.sphinx.wavefile.WaveFile&quot;
                fork=&quot;true&quot;
            maxmemory=&quot;128m&quot;&gt;
                    &lt;sysproperty key=&quot;frontend&quot; value=&quot;epFrontEnd&quot;/&gt;
            &lt;classpath refid=&quot;run.classpath&quot;/&gt;
            &lt;arg value=&quot;config.xml&quot;/&gt;
          &lt;/java&gt;
      &lt;/target&gt;
      

      </project>

      ==============================================
      the errors are as follows:
      ==============================================
      all:
      Compiling 1 source file to H:\Program Files\sphinx\sphinx4-1.0beta-src\sphinx4-1.0beta\bld\classes
      run:
      java.lang.NoClassDefFoundError: demo/sphinx/wavefile/WaveFile
      Caused by: java.lang.ClassNotFoundException: demo.sphinx.wavefile.WaveFile
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      Could not find the main class: demo.sphinx.wavefile.WaveFile. Program will exit.
      Exception in thread "main"
      Java Result: 1
      BUILD SUCCESSFUL (total time: 4 seconds)
      ===========================================

       
      • Nickolay V. Shmyrev

        I'm not quite sure why do you modify build.xml. To build wavfile use build.xml in the root of the archive or demo.xml in the root.

         
        • Magdalena Broniecka

          Hi Nickolay, i did same thing i took build.xml from main directory. You should edit the one from helloworld demo. It's short and contains data connected to this helloworld application.

          Unfortunately i'm facing another problem. I build jar file for let's say helloworld by adding code to build.xml:
          <jar jarfile="${lib_dir}/HelloWorld.jar"
          basedir="."
          manifest="${basedir}/helloworld.Manifest"
          />
          Everything goes great but i can't run the jar file because it says 'Could not find Main Class' I know that probably there is something wrong with manifest:
          Main-Class: demo.sphinx.helloworld.HelloWorld
          Class-Path: ../lib/sphinx4.jar ../lib/jsapi.jar ../lib/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar
          But i'm not sure what should i change since i'm using an original demo sphinx files.

          Thanks for help in advance or perhaps i will have another eureka in 10 minutes ;)

           
    • Ramki Balakrishnan

      thaks for your quick reply. if i change my build.xml file means how can i run the wavefile program in netbeans. i can run the program by build.xml in the wavefile folder only. please help

       
    • Ramki Balakrishnan

      in the link http://cmusphinx.sourceforge.net/sphinx4/doc/NetBeans.html
      they told only to copy the build.xml in the other demos.

       
      • Holger Brandl

        Holger Brandl - 2009-02-08

        Hi Ramki,

        sorry for inconvenience. I've already removed the file because it's not up-to-date anymore. Please follow the instructions at http://cmusphinx.sourceforge.net/sphinx4/#setupide

        Best,
        Holger

         
    • Ramki Balakrishnan

      i changed the build.xml correctly. but the got the errors. the errors are as follows.

      all:
      Compiling 1 source file to H:\Program Files\sphinx\sphinx4-1.0beta-src\sphinx4-1.0beta\bld\classes
      run:
      Loading Recognizer...

      Exception in thread "main" java.lang.NullPointerException
      at edu.cmu.sphinx.model.acoustic.TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader.loadProperties(ModelLoader.java:372)
      at edu.cmu.sphinx.model.acoustic.TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader.getIsBinaryDefault(ModelLoader.java:386)
      at edu.cmu.sphinx.model.acoustic.TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader.newProperties(ModelLoader.java:346)
      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.model.acoustic.TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model.newProperties(Model.java:159)
      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.setupAcousticModel(FlatLinguist.java:299)
      at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:246)
      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.wavfile.WavFile.main(WavFile.java:62)
      Java Result: 1
      BUILD SUCCESSFUL (total time: 1 second)

       
    • Ramki Balakrishnan

      why that nullpointexception occurs?

       
    • Ramki Balakrishnan

      its working now. i run the wavfile demo. i used sphinx4 nightly

       
  • nuguse negese

    nuguse negese - 2023-04-26

    how this error message happen
    can i solve this error .

    when HelloWorld.java run
    we use sphinix4.1.0 beta6

    class not found !java.lang.ClassNotFoundException: edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManag er
    Exception in thread "main" Property exception component:'decoder' property:'searchManager' - component 'wordPruningSearchManager' is missing
    edu.cmu.sphinx.util.props.InternalConfigurationException: component 'wordPruningSearchManager' is missing
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:289)
    at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:65)
    at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:37)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287)
    at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:90)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505)
    at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:161)
    at afoqasspechbased.HelloWorld.main(HelloWorld.java:39)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 0 seconds)

     

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.