Beispiel #1
0
        private async void InitDefaultRecognizerAsync()
        {
            if (!_recognizerInitialized)
            {
                var webSearchGrammar = new Windows.Media.SpeechRecognition.SpeechRecognitionTopicConstraint(Windows.Media.SpeechRecognition.SpeechRecognitionScenario.WebSearch, "webSearch");
                Recognizer.Constraints.Add(webSearchGrammar);
                await Recognizer.CompileConstraintsAsync();

                _recognizerInitialized = true;
            }
        }