/// <summary> /// This event is fired when the recognizer stops, whether from StartRecording() being called, a timeout occurring, or some other error. /// Typically, this will simply return "Complete". In this case, we check to see if the recognizer timed out. /// </summary> /// <param name="cause">An enumerated reason for the session completing.</param> private void DictationRecognizer_DictationComplete(DictationCompletionCause cause) { // If Timeout occurs, the user has been silent for too long. if (cause == DictationCompletionCause.TimeoutExceeded) { Microphone.End(deviceName); dictationResult = "Dictation has timed out. Please try again."; } IMixedRealityInputSystem inputSystem = Service as IMixedRealityInputSystem; inputSystem?.RaiseDictationComplete(inputSource, dictationResult, dictationAudioClip); textSoFar = null; dictationResult = string.Empty; }