private void OnHypothesisGenerated(string hypothesis) { HypothesisGenerated?.Invoke( this, new SpeechRecognitionHypothesisGeneratedEventArgs() { Hypothesis = new SpeechRecognitionHypothesis() { Text = hypothesis } }); }
private void SpeechRecognizer_HypothesisGenerated(SpeechRecognizer sender, SpeechRecognitionHypothesisGeneratedEventArgs args) { HypothesisGenerated?.Invoke(this, args); }
/// <summary> /// While the user is speaking, update the textbox with the partial sentence of what's being said for user feedback. /// </summary> /// <param name="sender">The recognizer that has generated the hypothesis</param> /// <param name="args">The hypothesis formed</param> private void SpeechRecognizer_HypothesisGenerated(SpeechRecognizer sender, SpeechRecognitionHypothesisGeneratedEventArgs args) { string hypothesis = args.Hypothesis.Text; HypothesisGenerated?.Invoke(this, hypothesis); }