I have a one problem in my program. I Want to convert speech to text and I have a this code:
Choices sList = new Choices();
sList.Add(new string[] { "hello" });
Grammar gr = new Grammar(new GrammarBuilder(sList));
try {
sRecognize.RequestRecognizerUpdate();
sRecognize.LoadGrammar(gr);
sRecognize.SpeechRecognized += sRecognize_SpeechRecognized;
sRecognize.SetInputToDefaultAudioDevice();
sRecognize.RecognizeAsync(RecognizeMode.Multiple);
sRecognize.Recognize();
}
catch (Exception ex) {
MessageBox.Show(ex.Message.ToString());
}
But when I using it, Visual Studio give an exception "platformnotsupportedexception" And say "The recognizer is not installed." I have a microphone, But I don't know why this don't job. Please Help Me.