protected void OnSpeechRecognized(SpeechRecognizedEventArgs e) { if (this.SpeechRecognized != null) this.SpeechRecognized(this, e); }
void speechRecognitionEngine_SpeechRecognized(object sender, Microsoft.Speech.Recognition.SpeechRecognizedEventArgs e) { var args = new SpeechRecognizedEventArgs { Text = e.Result.Text }; if (e.Result.Semantics.Value != null) args.Value = e.Result.Semantics.Value.ToString(); args.Confidence = e.Result.Confidence; this.OnSpeechRecognized(args); }