Menu

How to listen for multiple key phrases

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

    Vamsidhar - 2016-07-25

    Hello,I created a simple keyphrase search and it works fine. Below is my code. (Xamrin Android)

    KWS_SEARCH = "wakeup"
    KEYPHRASE = "open email"
     SpeechRecognizerSetup setUp = SpeechRecognizerSetup.DefaultSetup();
                    setUp.SetAcousticModel(new File(assetsDir, "en-us-ptm"));
                    setUp.SetDictionary(new File(assetsDir, "cmudict-en-us.dict"));
                    setUp.SetString("-lm", assetsDir + "/en-us.lm.bin");
                    setUp.SetKeywordThreshold(1e-45f);
                     _speechRecognizer = setUp.Recognizer;                
                    _speechRecognizer.AddListener(this);
                    _speechRecognizer.AddKeyphraseSearch(KWS_SEARCH, KEYPHRASE);
    
                     File options = new File(assetsDir, "options.gram");
                    _speechRecognizer.AddKeywordSearch(OPTIONS_SEARCH, options);
    

    Now, I need to listen for multiple phrases, like below

    options.gram

    submit a report /1e-4/
    any items to add /1e-4/
    report is now submitted /1e-4/
    create new report /1e-4/
    info /1e-4/
    exit /1e-4/
    submit /1/
    cancel /1e-20f/
    

    My speech recognizer receives info, cancel exit submit keywords. But not full phrases (submit a report, any items to add etc )

    What should be my approach? What I should do so that speech recognizer listens to multiple key phrases at a time.
    Thanks.

     

    Last edit: Vamsidhar 2016-07-25

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.