Пример #1
0
        private static void ContinuousRecognitionSession_ResultGenerated(SpeechContinuousRecognitionSession sender, SpeechContinuousRecognitionResultGeneratedEventArgs args)
        {
            Debugging.AddTimedString("Matched (" + args.Result.Confidence.ToString() + "): " + args.Result.Text);
            for (int i = 0; i < 5; i++)
            {
                BackgroundWords.Enqueue(args.Result.Text);
            }

            if (PuzzleCollection.CurrentPuzzle != null)
            {
                string[] words = args.Result.Text.Split(" ".ToCharArray());
                foreach (string word in words)
                {
                    if (PuzzleCollection.CurrentPuzzle.IsSolution(word))
                    {
                        PuzzleCollection.SolveCurrentPuzzle();
                        break;
                    }
                }
            }
        }
 public override void Transition()
 {
     PuzzleCollection.SolveCurrentPuzzle();
 }