The following reason may cause the captioned exception, i.e. ‘System.Reflection.TargetInvocationException’. Try and see if:
- A string, esp. the recognized word is empty or null before using it:
If this exception occurs in the same thread as the main thread, the exception will explicitly pop up and note you of this, but in the speech recognition, when you run _SRE.RecognizeAsync(RecognizeMode.Multiple); the recognition will run in a seperate thread, and in this execution, the ‘System.Reflection.TargetInvocationException’ will be thrown.