private void _oneTimeListener_SpeechReceived(object sender, SpeechEventArgs args) { var handler = CommandReceived; handler?.Invoke(sender, new CommandEventArgs {Name = args.Text}); _continuousListener.StartAsync(); }
private async void _continuousListener_SpeechReceived(object sender, SpeechEventArgs args) { var handler = CatchwordReceived; handler?.Invoke(sender, null); await _continuousListener.StopAsync(); await _oneTimeListener.StartAsync(); }
protected void OnSpeechReceived(object sender, SpeechEventArgs args) { var handler = SpeechReceived; handler?.Invoke(sender, args); }