예제 #1
0
    private IEnumerator RestartSpeechSystem(SpeechInputSource keywordToStart)
    {
        while (dictationRecognizer != null && dictationRecognizer.Status == SpeechSystemStatus.Running)
        {
            yield return(null);
        }

        keywordToStart.StartKeywordRecognizer();
    }
예제 #2
0
 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());
 }
예제 #3
0
        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>();
        }