private IEnumerator RestartSpeechSystem(SpeechInputSource keywordToStart) { while (dictationRecognizer != null && dictationRecognizer.Status == SpeechSystemStatus.Running) { yield return(null); } keywordToStart.StartKeywordRecognizer(); }
public void Start() { gt = GetComponent <GrammarParser>(); if (gt == null) { Debug.LogError("grammartesting null"); } sis = GetComponent <SpeechInputSource>(); if (sis == null) { Debug.LogError("speechinputsource null"); } //StartCoroutine(delayedInit()); }
private void Start() { dictationAudio = gameObject.GetComponent <AudioSource>(); startAudio = gameObject.AddComponent <AudioSource>(); stopAudio = gameObject.AddComponent <AudioSource>(); startAudio.playOnAwake = false; startAudio.clip = StartListeningSound; stopAudio.playOnAwake = false; stopAudio.clip = StopListeningSound; microphoneManager = GetComponent <MicrophoneManager>(); origLocalScale = Waveform.localScale.y; animateWaveform = false; speechInputSource = GetComponent <SpeechInputSource>(); }