public void OnDictationResult(DictationEventData eventData) { Debug.Log(eventData.DictationResult); StartCoroutine(DictationInputManager.StopRecording()); StartCoroutine(SubmitRequestToLuis(eventData.DictationResult)); eventData.Use(); }
/// <summary> /// Called when dictation result is obtained /// </summary> /// <param name="eventData">Dictation event data</param> public void OnDictationResult(DictationEventData eventData) { if (eventData.used) { return; } var text = eventData.DictationResult; ResetClosingTime(); if (text != null) { m_CaretPosition = InputField.caretPosition; InputField.text = InputField.text.Insert(m_CaretPosition, text); m_CaretPosition += text.Length; UpdateCaretPosition(m_CaretPosition); eventData.Use(); } }