I tried to programe some Speech Recognition app and I found this code:
SpeechRecognitionEngine recognitionEngine = new SpeechRecognitionEngine();
recognitionEngine.SetInputToDefaultAudioDevice();
recognitionEngine.LoadGrammar(new DictationGrammar());
RecognitionResult result = recognitionEngine.Recognize(new TimeSpan(0, 0,20));
foreach (RecognizedWordUnit word in result.Words)
{
Console.Write(word.Text);
}
But when I want to Debug it, it shows Error Access Denied HRESULT: 0x80070005 (E_ACCESSDENIED)) on command : recognitionEngine.SetInputToDefaultAudioDevice();
(The reference to System.Speech is set). I looked through many threads already, but I can't find an answer. Should I set somwhere the access to microphone or how can I solve this problem?
Thanks for the answer ;)