/// <summary> /// Session stopped event handler. Set the TaskCompletionSource to 0, in order to trigger Recognition Stop /// </summary> private void SessionStoppedEventHandler(SessionEventArgs e, RecoType rt, TaskCompletionSource <int> source) { source.TrySetResult(0); SpeechSessionStopedEventArgs eventArgs = new SpeechSessionStopedEventArgs(); eventArgs.Message = "Speech recognition: Session stopped event: " + e.ToString() + "."; OnSpeechSessionStopedEvent(eventArgs); }
/// <summary> /// ストップイベント発生 /// </summary> /// <param name="e"></param> protected virtual void OnSpeechSessionStopedEvent(SpeechSessionStopedEventArgs e) { SpeechSessionStopedEvent?.Invoke(this, e); }