public void RecordStop() { if (RecordStopButton.IsOn()) { // Turn off the microphone. microphoneManager.StopRecording(); // Restart the PhraseRecognitionSystem and KeywordRecognizer microphoneManager.StartCoroutine("RestartSpeechSystem", GetComponent <KeywordManager>()); // Set proper UI state and play a sound. SetUI(false, Message.SendMessage, stopAudio); PlayButton.SetActive(true); RecordStopButton.SetActive(false); } }
public void StopConversation() { // Turn off the microphone. if (microphoneManager.IsDictationRunning()) { microphoneManager.StopRecording(); } if (sceneScript.GetCurrDictationState() == -2) { failCalc = 0; microphoneManager.StartCoroutine("RestartSpeechSystem"); } else if (sceneScript.GetCurrDictationState() == -1) { textInvestorLabel.text = INVESTOR_TALKING_TXT; textInvestorLabel.gameObject.SetActive(true); textToSayLabel.gameObject.SetActive(false); textSaidLabel.gameObject.SetActive(false); } }
public void RecordStop() { if (recording) { // Turn off the microphone. microphoneManager.StopRecording(); // Restart the PhraseRecognitionSystem and KeywordRecognizer microphoneManager.StartCoroutine("RestartSpeechSystem", GetComponent <KeywordManager>()); if (DictationTypeLUIS == DictationToLUISType.OnPause) { SendToLuis(); microphoneManager.ClearDictation(); } // Set proper UI state and play a sound. SetUI(false, Message.SendMessage, stopAudio); PlayButtonObject.SetActive(true); RecordStopButtonObject.SetActive(false); RecordButtonObject.SetActive(true); recording = false; } }