The speech recognizer raises the AudioProblemOccurred event when it encounters conditions that interfere with accurate recognition of speech input. The range of audio problems is described in the SpeechRecognitionAudioProblem enumeration.
Set a handler for the event in your code, and the handler will be called when an audio problem occurs. The code in the handler should use the problem description to give user feedback about how to improve the conditions for recognition, such as prompting the player to speak louder.
If using a wave file, recognition from a wave file is performed and interrupted before the entire wave file is processed; typically this only happens with continuous recognition by using the StopContinuousRecognition method.
If using a text file, recognition from text is performed. If the issue happens here, it hangs forever.
The speech engine can hang if pending audio is canceled. The workaround is to not call StopContinuousRecognition when recognizing speech from an audio file. When switching to text input ensure that the entire audio file is processed by watching for a ContinuousSpeechRecognitionStatus_Completed event. If your title is in Pause mode, an additional call to resume is needed after each recognition available event to allow the continuous recognition operation to complete.
SetInputToText will hang when called after SetInputToAudioStream or SetInputToMicrophone, if the recognition from a wave file is interrupted before the entire file is processed; typically this only happens with continuous recognition by using the StopContinuousRecognition method.