private void Recognition() { if (recorder.Starting) { Stop(); } SpeechRecognition?.Invoke();// 调用委托,识别录制的语音 }
// 识别录音 private void button_Recognition_Click(object sender, EventArgs e) { //if (recorder.RecordedTime == -1) // return; if (recorder.Starting) { button2_Stop_Click(null, null); } SpeechRecognition?.Invoke();// 调用委托,识别录制的语音 }