Menu

Own sphinx4 application making problem : Error on microphone input

Shimul
2012-10-13
2012-10-17
  • Shimul

    Shimul - 2012-10-13

    Operating System : Windows 7
    Using Software : Eclipse SDK(Version: 3.7.1), sphinx4-1.0beta6

    I made the language model and acoustic model for my language(Bengali) successfully.By testing with pocketsphinx i got 83.3% accuracy. Now I am trying to making my own sphinx4 application in eclipse ide with the help of sphinx4 demo application.

    I created a eclipse project with the help of sphinx4 demo app and I added my language model and acoustic model into it by editing config.xml file and i run the application then i got some error

    > Loading... 01:47:06.588 WARNING dictionary Missing word: আপনার 01:47:07.372 WARNING dictionary Missing word: আপনার Exception in thread "main" java.lang.NullPointerException at com.sun.media.sound.Toolkit.isFullySpecifiedAudioFormat(Unknown Source) at com.sun.media.sound.AbstractDataLine.open(Unknown Source) at edu.cmu.sphinx.frontend.util.Microphone.open(Microphone.java:364) at edu.cmu.sphinx.frontend.util.Microphone.startRecording(Microphone.java:435) at edu.cmu.sphinx.demo.hellongram.HelloNGram.main(HelloNGram.java:43)

    Details

    I run all sphinx4 demo application with the eclipse ide and its recognizing my speech very well.

    I made language model in lm toolkit online and acoustic model in linux(ubuntu 11.10). After that i take this models and go to windows 7.

    First I create a project in eclipse and add the js.jar, jsapi.jar sphinx4.jar, tags.jar in library .
    then i copy the dic,filler,lm,lm.dmp files and sbs_asr.cd_cont_100(my acoustic model folder created in model_parameters folder when training) in src folder of my eclipse project.

    after that i copy HelloNGram.java from hellongram demo to my project src. I edited it and said that my config file name is sbs_asr.config.xml

    I take config.xml from lattice demo of sphinx4 and rename it as sbs_asr.config.xml and added to my eclipse project src.

    then i started to edit this sbs_asr.config.xml file to say the application that where is my dic,filler,lm and acoustic model by the help of this link from sphinx

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

    I edit this config file and say my dictionary config like that

    <property name="dictionaryPath" value="file:/C:/Users/shimul/workspace/sbs_asr2/src/edu/cmu/sphinx/demo/hellongram/sbs_asr.dic"/> <property name="fillerPath" value="file:/C:/Users/shimul/workspace/sbs_asr2/src/edu/cmu/sphinx/demo/hellongram/sbs_asr.filler"/>

    language model config like that

    <property name="location" value="file:/C:/Users/shimul/workspace/sbs_asr2/src/edu/cmu/sphinx/demo/hellongram/sbs_asr.lm.DMP"/>

    acoustic model config like that

    <property name="location" value="file:/C:/Users/shimul/workspace/sbs_asr2/src/edu/cmu/sphinx/demo/hellongram/sbs_asr.cd_cont_100"/>

    you can see my full config file here

    https://docs.google.com/open?id=0B8hu_3BdFeZodjlKMW5XV1JUUmM

    HelloNGram.java file here

    https://docs.google.com/open?id=0B8hu_3BdFeZoSGFqZWJjUExfODQ

    After doing all this things i run the application and it shows me the above error

    By seeing this error i can understand its a microphone input problem but i run the sphinx4 demo Hellongram even all the demo without any error and it recognizing my speech and show the recognized text.

    I think may be i did some wrong things in making eclipse project. So Please help me to solve this error and run my application. I really need this , I have to complete my final year project. I am very much thankful to Sir Nickolay V. Shmyrev for helping me at different step for making the acoustic model.

    You can see screenshots of my eclipse project and workspace folder here

    https://docs.google.com/folder/d/0B8hu_3BdFeZoQVhMVU9kcDhwa0E/edit

     

    Last edit: Shimul 2012-10-13
  • Nickolay V. Shmyrev

    Your config xml file is not correct. Frontend list of the processors should include microphone item, it includes audioFileDataSource instead. For the proper config see the HelloWorld sources.

     
  • Shimul

    Shimul - 2012-10-15

    Thank You sir. Now program is running without any error. But the accuracy is very poor, even no word is coming as it is saying. I trained with 2.26mins audio may be that is the point for this kind of accuracy but in pocketsphinx i got 83.3% accuracy. Sir what should I do for improving accuracy at a satisfied point.

     
  • Nickolay V. Shmyrev

    Sir what should I do for improving accuracy at a satisfied point.

    Follow the training tutorial precisely. 2.26mins is not enough. You need 1 hour.

     
  • Shimul

    Shimul - 2012-10-16

    I have ten sentences for recognizing. It takes maximum 25 seconds to record than how to fill up 1 hour. Am i need a lot of speakers to fill up this 1 hour recording.

    One more question Sir how to find the accuracy result when testing with sphinx4 in eclipse by microphone.

     
  • Nickolay V. Shmyrev

    It takes maximum 25 seconds to record than how to fill up 1 hour.

    Record muliple times (up to 100) or use adaptation instead of training.

    how to find the accuracy result when testing with sphinx4 in eclipse by microphone

    There is no support for that, you can test accuracy in offline mode.

     

Log in to post a comment.