Exemple #1
0
 public void Initialize()
 {
     _speechRecognition = SpeechRecognitionModule.Instance;
     _speechRecognition.SetSpeechContext(ContextPhrases);
     (_speechRecognition as SpeechRecognitionModule).isRuntimeDetection = true;
     _speechRecognition.SpeechRecognizedSuccessEvent += SpeechRecognizedSuccessEventHandler;
     _speechRecognition.SpeechRecognizedFailedEvent  += SpeechRecognizedFailedEventHandler;
     //StartCoroutine(RecordLoop());
     _speechRecognition.StartRuntimeRecord();
 }
Exemple #2
0
        private void StartRuntimeDetectionButtonOnClickHandler()
        {
            ApplySpeechContextPhrases();

            _startRuntimeDetection.interactable = false;
            _stopRuntimeDetection.interactable  = true;
            _speechRecognitionState.color       = Color.green;
            _speechRecognitionResult.text       = "";
            _speechRecognition.StartRuntimeRecord();
        }