private void InputSource_SpeechKeywordRecognized(object sender, SpeechKeywordRecognizedEventArgs e)
        {
            // Create input event
            speechKeywordRecognizedEventData.Initialize(e.InputSource, e.SourceId, e.Confidence, e.PhraseDuration, e.PhraseStartTime, e.SemanticMeanings, e.RecognizedText);

            // Pass handler through HandleEvent to perform modal/fallback logic
            HandleEvent(speechKeywordRecognizedEventData, OnSpeechKeywordRecognizedEventHandler);
        }
        protected void RaiseSpeechKeywordRecognizedEvent(SpeechKeywordRecognizedEventArgs e)
        {
            EventHandler <SpeechKeywordRecognizedEventArgs> handler = SpeechKeywordRecognized;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #3
0
        private void OnPhraseRecognized(ConfidenceLevel confidence, TimeSpan phraseDuration, DateTime phraseStartTime, SemanticMeaning[] semanticMeanings, string text)
        {
            SpeechKeywordRecognizedEventArgs raiseArgs = new SpeechKeywordRecognizedEventArgs(this, 0, confidence, phraseDuration, phraseStartTime, semanticMeanings, text);

            RaiseSpeechKeywordRecognizedEvent(raiseArgs);
        }