protected override void OnGetResponse(string res) { var response = JsonUtility.FromJson <CleverBotResponseBase>(res); Speecher.Speech(response.Text); ChatBot.Cs = response.cs; }
public virtual void OnGUI() { if (GUILayout.Button("Connect")) { StartCoroutine(Speecher.Connect()); } if (GUILayout.Button("InitServer")) { StartCoroutine(Speecher.InitServer()); } m_msg = GUILayout.TextField(m_msg); if (GUILayout.Button("Speak")) { Speecher.Speech(m_msg); } if (GUILayout.Button("Pause")) { StartCoroutine(Speecher.Pause()); } if (GUILayout.Button("Resume")) { StartCoroutine(Speecher.Resume()); } if (GUILayout.Button("Recognize Start")) { Speecher.Recognize(true); } if (GUILayout.Button("Recognize End")) { Speecher.Recognize(false); } }
public static void Speak(string str) { #if UNITY_EDITOR || UNITY_STANDALONE_WIN Ins.Speech(str); #endif }
protected override void OnGetResponse(string res) { var response = JsonUtility.FromJson <TuLingResponseBase>(res); Speecher.Speech(response.text); }