Ejemplo n.º 1
0
        /// <summary>
        /// Logs Canceled events
        /// And sets the TaskCompletionSource to 0, in order to trigger Recognition Stop
        /// </summary>
        private void CanceledEventHandler(SpeechRecognitionCanceledEventArgs e, RecoType rt, TaskCompletionSource <int> source)
        {
            SpeechCanceledEventArgs eventArgs = new SpeechCanceledEventArgs();

            eventArgs.Message = "--- recognition canceled ---";
            OnSpeechCanceledEvent(eventArgs);
            eventArgs.Message = $"CancellationReason: {e.Reason.ToString()}. ErrorDetails: {e.ErrorDetails}.";
            OnSpeechCanceledEvent(eventArgs);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// キャンセルイベントを発生
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnSpeechCanceledEvent(SpeechCanceledEventArgs e)
 {
     SpeechCanceledEvent?.Invoke(this, e);
 }