Пример #1
0
 private void StopRecordButtonOnClickHandler()
 {
     Debug.Log("Stoped record!");
     record.transform.gameObject.SetActive(true);
     stop.transform.gameObject.SetActive(false);
     record.interactable = false;
     _speechRecognition.StopRecord();
 }
Пример #2
0
        private void StopRecordButtonOnClickHandler()
        {
            ApplySpeechContextPhrases();

            _stopRecordButton.interactable = false;
            _speechRecognitionState.color  = Color.yellow;
            _speechRecognition.StopRecord();
        }
Пример #3
0
    private IEnumerator RecordLoop()
    {
        _speechRecognition.StartRecord();
        yield return(new WaitForSeconds(2));

        _speechRecognition.StopRecord();
        yield return(null);

        StartCoroutine(RecordLoop());
    }
Пример #4
0
 private void Update()
 {
     if (!recording && recordButtonPressed)
     {
         //_startRecordButton.interactable = false;
         //_speechRecognitionState.color = Color.red;
         _speechRecognitionResult.text = "Korgi is listening";
         _speechRecognition.StartRecord();
         print("Start recording speech");
         recording = true;
     }
     else if (recording && !recordButtonPressed)
     {
         ApplySpeechContextPhrases();
         print("Stop recording");
         _speechRecognitionResult.text = "Analyzing your words";
         //_stopRecordButton.interactable = false;
         //_speechRecognitionState.color = Color.yellow;
         _speechRecognition.StopRecord();
         recording = false;
     }
     status = anim.GetInteger("status");
 }
Пример #5
0
 private void StopRecordButtonOnClickHandler()
 {
     Debug.Log("Stoped record!");
     _speechRecognition.StopRecord();
 }