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;
        }
예제 #3
0
 void IMixedRealityDictationHandler.OnDictationError(DictationEventData eventData)
 {
     OnDictationError.Invoke(eventData.DictationResult);
 }
예제 #4
0
 void IMixedRealityDictationHandler.OnDictationComplete(DictationEventData eventData)
 {
     OnDictationComplete.Invoke(eventData.DictationResult);
 }
예제 #5
0
 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;
 }