Menu

Difficult with speech recognition acuracy for Xamarin android application

Help
Vamsidhar
2016-07-25
2016-07-25
  • Vamsidhar

    Vamsidhar - 2016-07-25

    Hello Team, I am very much new to CMU Sphnix. I am having some difficulty with speech acuracy for my Xamarin Android App. I created "pocketsphinixLib.dll" using Bindings library(Android). (I followed https://forums.xamarin.com/discussion/8773/how-to-handle-so-libs-in-java-bindings-library).

    I follwed this and created a Xamarin Android App using C#. https://github.com/cmusphinx/pocketsphinx-android-demo/tree/master/app/src/main/java/edu/cmu/pocketsphinx/demo.

    Here is my SpeechRecognizerSetUp Instance and also digits.gram file which was added as keyword search.I set a threshold for each word.

     SpeechRecognizerSetup setUp = SpeechRecognizerSetup.DefaultSetup();
                    setUp.SetAcousticModel(new File(assetsDir, "en-us-ptm"));
                    setUp.SetDictionary(new File(assetsDir, "cmudict-en-us.dict"));                
                    setUp.SetInteger("-maxhmmpf", 10000);
                    setUp.SetBoolean("-fwdflat", false);
                    setUp.SetBoolean("-bestpath", false);
                    setUp.SetFloat("-vad_threshold", 3.0);
                    _speechRecognizer = setUp.Recognizer;
                    _speechRecognizer.AddListener(this);
    
                    File menuGrammar = new File(assetsDir, "digits.gram");
                    _speechRecognizer.AddKeywordSearch(OPTIONS_SEARCH, menuGrammar);
    

    digits.gram

    create /1e-5/
    submit /1e-0/
    cancel /1e-0/
    exit /1e-5/
    scan /1e-5/
    info /1e-4/
    

    Speech recognizer is listening and firing OnPartial and OnResult events successfully for key words "Create, exit, scan, info".
    But for words "submit, cancel" OnPartial and OnResult events are not firing. After putiing lot of stress in my voice and trying different things like putting phone close to my face these events are fired may be once or twice.
    1. Is my speech recognizer setup instance is correct? Am I missing some thing?
    2. So can you please tell me how to train my speech recognizer more accurate so it listens Submit and cancel too?
    3. I have list of sentences with 3-4 words which speech recognizer should always listen to.Like, "Start a new Report", "Failure to track a report", "Any additional items to add" - For this which approach I should follow so speech recognizer is acurate? Keyword or Grammar?

    can some one help me on this? I am pretty much new here.

     
    • Nickolay V. Shmyrev

      1. Is my speech recognizer setup instance is correct? Am I missing some thing?

      If you only using keyword spotting you do not need

                  setUp.SetInteger("-maxhmmpf", 10000);
                  setUp.SetBoolean("-fwdflat", false);
                  setUp.SetBoolean("-bestpath", false);
      
      1. So can you please tell me how to train my speech recognizer more accurate so it listens Submit and cancel too?

      This issue is covered in tutorial http://cmusphinx.sourceforge.net/wiki/tutoriallm#keyword_lists

      You need to tune thresholds on a sample file. For now your threshold for problematic words seems to high.

      1. I have list of sentences with 3-4 words which speech recognizer should always listen to.Like, "Start a new Report", "Failure to track a report", "Any additional items to add" - For this which approach I should follow so speech recognizer is acurate? Keyword or Grammar?

      Grammmar mode does not support continuous listening so you can only use keyphrase spotting.

       
  • Vamsidhar

    Vamsidhar - 2016-07-25

    @Nickolay V. Shmyrev, Thanks for your reply.

    You need to tune thresholds on a sample file. For now your threshold for problematic words seems to high. - Can you suggest what should be ideal value for these words?.(Above link is not working. Else I might have check)

    I have list of sentences with 3-4 words which speech recognizer should always listen to.Like, "Start a new Report", "Failure to track a report", "Any additional items to add" - For this which approach I should follow so speech recognizer is acurate? Keyword or Grammar?

    Okay. Thanks.I will try keyword search. I will get back incase of issue.

     
  • Vamsidhar

    Vamsidhar - 2016-07-25

    @Nickolay, I was able to implement keyphrase search for single phrase. I am listening single phrase successfully. Regarding searching for multiple phrases I opened a seperate thread.

    You can close this. Thanks for your reply.

     

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.