void IMixedRealityDictationHandler.OnDictationComplete(DictationEventData eventData) { Debug.Log("Complete!"); Task.Run(() => { while (!dictationSystem.IsReadyToStart) { } completed = true; }); }
void IMixedRealityDictationHandler.OnDictationResult(DictationEventData eventData) { string[] sentences = eventData.DictationResult.Split(new[] { ". " }, StringSplitOptions.RemoveEmptyEntries); string textToShow = ""; if (sentences.Length > 0 && sentences.Length <= numSentences) { foreach (string stc in sentences) { textToShow += stc + ".\n"; } } else if (sentences.Length > numSentences) { for (int i = sentences.Length - numSentences; i < sentences.Length; ++i) { textToShow += sentences[i] + ".\n"; } } result.text = textToShow; }
void IMixedRealityDictationHandler.OnDictationError(DictationEventData eventData) { OnDictationError.Invoke(eventData.DictationResult); }
void IMixedRealityDictationHandler.OnDictationComplete(DictationEventData eventData) { OnDictationComplete.Invoke(eventData.DictationResult); }
void IMixedRealityDictationHandler.OnDictationHypothesis(DictationEventData eventData) { OnDictationHypothesis.Invoke(eventData.DictationResult); }
void IMixedRealityDictationHandler.OnDictationHypothesis(DictationEventData eventData) { //hypothesis.text = eventData.DictationResult; }
void IMixedRealityDictationHandler.OnDictationError(DictationEventData eventData) { status.text = eventData.DictationResult; }