Search Unity

Audio windows speech GrammarRecognizer doesnt work?

Discussion in 'Audio & Video' started by philtha, Dec 3, 2018.

  1. philtha

    philtha

    Joined:
    Mar 14, 2017
    Posts:
    9
    Does someone know if there is a problem with the Windows speech GrammarRecognizer?
    It does not run for me. All other speech stuff is running well.
    On a Visual Studio c# native application it does work but in unity it doesnt.


    Code (CSharp):
    1.                 string ppath = Application.streamingAssetsPath + "/" + SRGSFileName;
    2.                 grammarRecognizer = new GrammarRecognizer(ppath);
    3.                 grammarRecognizer.OnPhraseRecognized += GrammarRecognizer_OnPhraseRecognized;
    4.                 grammarRecognizer.Start();