示例#1
0
        private void SubscribedMessage(Speech.Speech spokenText)
        {
            switch (spokenText.TextSpoken)
            {
            case "Thank you Dodo":
                Speech.SpeechSynthezier speechSynthezier = new Speech.SpeechSynthezier();
                speechSynthezier.Speak("Your welcome and thanks to giving me this oppurtunity");
                VideoDetails videoDetails = VideoCollection.Find(x => x.Id == 13);
                System.Windows.Application.Current.Dispatcher.InvokeAsync(() => { PlayVideo(videoDetails); });
                break;
                //case "Pause the Video Dodo":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PauseVideo();
                //    });

                //    break;
                //case "Continue video Dodo":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PlayAfterPauseVideo();
                //    });

                //    break;
                //case "Start gaurdx presentation":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PptDetails details = PptCollection.Find(x => x.Id == 3);
                //        PptAction(details);
                //    });

                //    break;
                //case "Backward video":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        PositionBackVideo();
                //    });

                //    break;
                //case "Previous Slide Dodo":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        if (objPresSet != null)
                //        {
                //            if (objPresSet.Count > 0)
                //            {
                //                objPres.SlideShowWindow.View.Previous();
                //            }
                //        }
                //    });

                //    break;
                //case "Stop video":
                //    System.Windows.Application.Current.Dispatcher.InvokeAsync(() => {
                //        StopVideo();
                //    });

                //    break;
            }
        }
 private void SubscribedMessage(Speech.Speech spokenText)
 {
     speechSynthezier.Speak(spokenText.TextSpoken);
 }