Beispiel #1
0
            ///////////////////////////////////////////////////////////////////
            // element
            ///////////////////////////////////////////////////////////////////

            public IEnumerator <ccr.ITask> RunHandler(Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.SpeechRecognitionRejected message)
            {
                Increment();

                Increment();
                _mergeAlpha.Post(message.Body);

                Decrement();

                yield return(WaitUntilComplete());
            }
        /// <summary>
        /// Speech recognition rejected handler
        /// </summary>
        /// <param name="rejected"></param>
        private void SpeechRecognitionRejectedHandler(sr.SpeechRecognitionRejected rejected)
        {
            // Keep speech event queue from growing infinitely
            if (_state.SpeechEvents.Count == MaxSpeechEventsToRetain)
            {
                _state.SpeechEvents.RemoveAt(0);
            }

            // Add latest event to queue
            _state.SpeechEvents.Add(new EventListEntry(rejected.Body));
        }
Beispiel #3
0
        IEnumerator <ccr.ITask> SpeechRecognizerSpeechRecognitionRejectedHandler(Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.SpeechRecognitionRejected message)
        {
            OnSpeechRecognizerSpeechRecognitionRejectedHandler handler = new OnSpeechRecognizerSpeechRecognitionRejectedHandler(this, Environment.TaskQueue);

            return(handler.RunHandler(message));
        }