Example #1
0
        private void SetRecognizerMode(RecognizerMode mode)
        {
            string result = string.Empty;

            speechRecognizer.StopProcessing();
            Debug.WriteLine(result);
            result = speechRecognizer.SetSearch(mode.ToString());
            Debug.WriteLine(result);
            speechRecognizer.StartProcessing();
            Debug.WriteLine(result);

            ModeMessageBlock.Text = string.Format("running '{0}' mode", mode);
        }
        private async void LoadOnlyForSingleUtteranceRecognitionAsync()
        {
            InnitiazeButtonsStack.Visibility = Visibility.Collapsed;

            progressBar.IsIndeterminate   = true;
            ContentPanel.IsHitTestVisible = false;

            StateMessageBlock.Text = "components are loading";

            // Initializing
            await InitialzeSpeechRecognizerForSingleUtterance();

            speechRecognizer.SetSearch("goforward");

            // UI
            progressBar.Visibility        = Visibility.Collapsed;
            progressBar.IsIndeterminate   = false;
            ContentPanel.IsHitTestVisible = true;
            StateMessageBlock.Text        = "ready for use";
            TipMessageBlock.Text          = "this example operates with a recorded file";

            UtteranceRecognitionButtonsStack.Visibility = Visibility.Visible;
        }