Распознавание голоса с C# - PullRequest
       14

Распознавание голоса с C#

0 голосов
/ 14 апреля 2020

У меня проблема с переключателем в C# в Visual Studio

private void sre_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
     switch (e.Result.Text.ToString())
     {
          case "Hello":
              ss.SpeakAsync("Hello Teacher");
              break;
          case "How are you":
              ss.SpeakAsync("I am doing great Teacher");
              break;
          case "Whats is the current time":
              ss.SpeakAsync("current time is " + time.Now.ToLongTimeString());
              break;
          case "Thank you":
              ss.SpeakAsync("My Pleasure");
              break;
          case "Start Chrome":
              Process.Start("Chrome", "https://www.google.com/");
              break;
          case "Open PPT":
              Process.Start("C:\Users\Abdulaziz\Desktop\Presitations");
              break;
          case "close":
              Application.Exit();
              break;
     }
     txtContens.Text += e.Result.Text.ToString() + Environment.NewLine;
}

Пожалуйста, помогите ...

...