示例#1
0
 private void StartCall()
 {
     GlobalFlowControl.TelepresenceMode = true;
     GlobalFlowControl.IsRoving         = false;
     ChatModule.End();
     //GlobalFlowControl.SendToBase("Telepresence", "StartTele");
 }
示例#2
0
 private void StartGuidedTour(string status)
 {
     if (status == "StartTour")
     {
         ChatModule.End();
     }
 }
示例#3
0
 public void ActivateChatBot()
 {
     if (GlobalFlowControl.moduleActivated)
     {
         return;
     }
     Task.Run(() => ChatModule.Start()).ConfigureAwait(false);
 }
        public static async Task <string> Recognize()
        {
            string text = null;

            if (GlobalFlowControl.AskByPressingButton)
            {
                GlobalFlowControl.AskByPressingButton = false;
                ChatModule.StopCheckingIdle();
                GlobalFlowControl.IsRoving = false;
                //SendToRobotBase("Navigation", "Stop");

                text = await AskQuestion().ConfigureAwait(false);
            }
            else
            {
                ConversationGlobalFlow.Activated = false;
                var result = await RecognizeQuery(ACTIVATE_WAITING_TIME).ConfigureAwait(false);

                if (result != null)
                {
                    if (IsContainKeyword(result.ToLower()))
                    {
                        ConversationGlobalFlow.Activated = true;
                        ChatModule.StopCheckingIdle();
                        //if (GlobalFlowControl.AskByPressingButton) return null;
                        GlobalFlowControl.IsRoving = false;
                        //SendToRobotBase("Navigation", "Stop");
                        SendToRobotBase("DisplayMedia", GlobalData.ListeningModeImg);
                        //if (GlobalFlowControl.AskByPressingButton) return null;
                        SpeechGeneration.SpeakAsync("Yes? ");
                        text = await AskQuestion().ConfigureAwait(false);
                    }
                    else
                    {
                    }
                }
            }
            return(text);
        }