private void StartBtn_Click(object sender, EventArgs e) { CopyScreenBtn.PerformClick(); StartBtn.Enabled = false; PauseBtn.Enabled = true; Decca.SpeakAsync(converttxt.Text); }
private void engine_Recognized(object sender, SpeechRecognizedEventArgs e) { string speech = e.Result.Text; switch (speech) { case "start reading": CopyScreenBtn.PerformClick(); StartBtn.PerformClick(); break; case "read the result": case "read the resuls": case "whats the result": case "whats the results": GetResult(); break; case "search": SearchBtn.PerformClick(); break; case "pause": PauseBtn.PerformClick(); break; case "resume": PauseBtn.PerformClick(); break; case "back": BackBtn.PerformClick(); break; case "next": ForwardBtn.PerformClick(); break; case "stop": StopBtn.PerformClick(); break; case "close website search": Decca.Speak("Closing Website Reader"); CloseBtn.PerformClick(); break; case "hide website reader": FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Minimized; TopMost = false; break; case "show website reader": case "show website reader again": FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Normal; TopMost = true; break; default: break; } if (speech == "find") { string Speech = e.Result.Text; Qevent = Speech; Speech = string.Empty; Decca.SpeakAsync("what do you want to search"); speech = string.Empty; Process_OutputDataReceived(); } }