0

Hi Currently I'm trying to do a simple Voice Recognition but when I try to do this:

 SpeechRecognitionEngine recEngine;
 var language = new System.Globalization.CultureInfo("en");
 recEngine = new SpeechRecognitionEngine(language); //Crashes here.
 recEngine.SetInputToDefaultAudioDevice();
 var _dictationGrammar = new DictationGrammar();
 recEngine.LoadGrammar(_dictationGrammar);
 recEngine.SpeechRecognized += recEngine_ListenEvent;

It crashes because of : 'No recognizer of the required ID found. Parameter name: culture'

What I got as usings are:

using System.Speech.Recognition;
using System.Globalization;

Any Idea? What I think is that I need to install the recognition language but is there a way to do so in code?

AlbertoRP
  • 1
  • 1
  • I believe, this is due to `CultureInfo`, which should be "-", so in your case "en-US"/"en-UK"/"en-GB"/"en-AU". (see https://en.wikipedia.org/wiki/Language_localisation) – jAC Dec 29 '18 at 19:53
  • Also tried with "en-US" and doesn't work. Same error. – AlbertoRP Dec 29 '18 at 19:56
  • According to this question, you have to switch from the System.Speech.* package to Microsoft.Speech.*. (https://stackoverflow.com/questions/16856798/speechrecognitionengine-installedrecognizers-returns-no-recognizer-installed) – jAC Dec 29 '18 at 19:57
  • I tried that and Microsoft.Speech Does not exist in my assemblies. – AlbertoRP Dec 29 '18 at 19:58

0 Answers0