private void btnRecord1_Click(object sender, EventArgs e) { //Enable/Disable the buttons as required audioCapture a = new audioCapture(); functionResult f = a.onRecord(ref audioStream1); if (f.Result == true) { timerClock.Start(); setValidStream(false); btnStopRecord1.Enabled = true; } }
private void btnSpeakCommand_Click(object sender, EventArgs e) { //create the audio capture functionality and start recording audioCapture a = new audioCapture(); functionResult r = a.onRecord(ref audioStream1); if (r.Result == true) { //If there are no errors. Set the lable text and button enable/disable. //also start the timer txtTextRecognises.Text = "Please say your command:"; timerClock.Start(); btnStartCommand.Enabled = false; btnStopCommand.Enabled = true; } }
private void btnRecord_Click(object sender, EventArgs e) { //create the audio capture functionality and start recording audioCapture a = new audioCapture(); functionResult r = a.onRecord(ref audioStream1); if (r.Result == true) { //If there are no errors. Set the lable text and button enable/disable. //also start the timer timerClock.Start(); btnRecord.Enabled = false; btnCreate.Enabled = false; btnStopRecording.Enabled = true; } }