Пример #1
0
        private void ApplySpeechContextPhrases()
        {
            string[] phrases = _contextPhrases.text.Trim().Split(","[0]);

            if (phrases.Length > 0)
            {
                _speechRecognition.SetSpeechContext(phrases);
            }
        }
Пример #2
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();
 }
Пример #3
0
 private void ApplySpeechContextPhrases()
 {
     //add context phrases
     string[] phrases = { "sit down", "stand up", "lay down", "bark", "stop", "Korgi" };
     _speechRecognition.SetSpeechContext(phrases);
 }