0

I am developing a speech recognition software using c sharp and i am having this problem i searched it on google but did not find any solution and also posted the question in msdn but no one seems to help and i also reinstalled my audio device driver and it is updated version , i have sony vaio fit 15218sgw and it is realtek audio device and i am using visual studio 2013 the code at line 171,172,173 is

case "who is your daddy":
                    Nevan.Speak("I dont have a daddy");
                    break;

)

The error : System.Speech.Internal.Synthesis.AudioException was unhandled by user code
HResult=-2146233088
Message=Audio device error encountered. - Error Code: 0x4
Source=System.Speech StackTrace: at System.Speech.Internal.Synthesis.VoiceSynthesis.Speak(Prompt prompt) at System.Speech.Synthesis.SpeechSynthesizer.Speak(Prompt prompt) at System.Speech.Synthesis.SpeechSynthesizer.Speak(String textToSpeak) at Nevan.Form1._recognizer_SpeechRecognized(Object sender,SpeechRecognizedEventArgs e) in c:\Users\Shehroz\Documents\Visual Studio 2013\Projects\Nevan\Nevan\Form1.cs:line 172 at System.Speech.Recognition.SpeechRecognitionEngine.SpeechRecognizedProxy(Object sender, SpeechRecognizedEventArgs e) InnerException:

Nevan
  • 1
  • 1

1 Answers1

0

try this : speechSynthesizer.Speak("I dont have a daddy");

Friyank
  • 469
  • 3
  • 8