// Use this for initialization void Awake() { initSpech(); //AndroidPermissionsUsageExample permision = GameObject.FindObjectOfType<AndroidPermissionsUsageExample>(); //permision.OnBrowseGalleryButtonPress(); instance = this; }
public void onError(string errorMessage) { //speechContoller control = GameObject.FindObjectOfType<speechContoller>(); speechContoller control = speechContoller.getInstance(); Debug.Log("ENTER callback onError: " + errorMessage); control.speechReturned.text = errorMessage; }
public void onStart(string startmessage) { //speechContoller control = GameObject.FindObjectOfType<speechContoller>(); speechContoller control = speechContoller.getInstance(); Debug.Log("ENTER callback onStart: " + startmessage); control.speechReturned.text = startmessage; }
public static speechContoller getInstance() { { if (instance == null) { instance = new speechContoller(); } return(instance); } }
public void onSuccess(string textSpeech) { //speechContoller control = GameObject.FindObjectOfType<speechContoller>(); speechContoller control = speechContoller.getInstance(); Debug.Log("ENTER callback onSuccess: " + textSpeech); control.settext(textSpeech); //BotInput chat = GameObject.FindObjectOfType<BotInput>(); BotInput chat = BotInput.getInstance(); string texto = textSpeech; chat.SendQuestionToRobotFromSpeech(texto); }