private void Update()
 {
     if (lunarcomController.CurrentRecognitionMode() == RecognitionMode.Speech_Recognizer)
     {
         if (recognizedString != "")
         {
             lunarcomController.UpdateLunarcomText(recognizedString);
         }
     }
 }
 private void Update()
 {
     Debug.Log(lunarcomController.CurrentRecognitionMode());
     if (lunarcomController.CurrentRecognitionMode() == RecognitionMode.Offline)
     {
         Debug.Log("Now offline mode");
         if (recognizedString != "" && recognizedString != "Offline Transcription:\n")
         {
             Debug.Log("recognized string isn't blank and it's not Offline Transcription");
             if (recognizedString != "Say something..." && recognizedString != "Select a mode to begin.")
             {
                 string combinedString = "Offline Transcription:\n" + recognizedString;
                 lunarcomController.UpdateLunarcomText(combinedString);
             }
             else
             {
                 lunarcomController.UpdateLunarcomText(recognizedString);
             }
         }
     }
 }
示例#3
0
    private void Update()
    {
        if (lunarcomController.CurrentRecognitionMode() == RecognitionMode.Tralation_Recognizer)
        {
            if (recognizedString != "")
            {
                lunarcomController.UpdateLunarcomText(recognizedString);

                if (translatedString != "")
                {
                    lunarcomController.outputText.text += "\n\nSending...\n" + translatedString;
                }
            }
        }
    }
示例#4
0
    private void Update()
    {
        if (lunarcomController.CurrentRecognitionMode() == RecognitionMode.Intent_Recognizer)
        {
            lunarcomController.UpdateLunarcomText(recognizedString);

            if (commandCaptured)
            {
                foreach (LunarcomButtonController button in lunarcomController.lunarcomButtons)
                {
                    if (button.GetIsSelected())
                    {
                        button.DeselectButton();
                    }
                }
                commandCaptured = false;
            }
        }
    }
 private void Update()
 {
     if (lunarcomController.CurrentRecognitionMode() == RecognitionMode.Disabled)
     {
         if (lunarcomController.Terminal.activeSelf)
         {
             if (recognizedString.ToLower().Contains(DismissWord.ToLower()))
             {
                 lunarcomController.HideTerminal();
             }
         }
         else
         {
             if (recognizedString.ToLower().Contains(WakeWord.ToLower()))
             {
                 lunarcomController.ShowTerminal();
             }
         }
     }
 }