public void Initialize() { _speechRecognition = SpeechRecognitionModule.Instance; _speechRecognition.SetSpeechContext(ContextPhrases); (_speechRecognition as SpeechRecognitionModule).isRuntimeDetection = true; _speechRecognition.SpeechRecognizedSuccessEvent += SpeechRecognizedSuccessEventHandler; _speechRecognition.SpeechRecognizedFailedEvent += SpeechRecognizedFailedEventHandler; //StartCoroutine(RecordLoop()); _speechRecognition.StartRuntimeRecord(); }
private void StartRuntimeDetectionButtonOnClickHandler() { ApplySpeechContextPhrases(); _startRuntimeDetection.interactable = false; _stopRuntimeDetection.interactable = true; _speechRecognitionState.color = Color.green; _speechRecognitionResult.text = ""; _speechRecognition.StartRuntimeRecord(); }