0

The following code returns an empty search query and I need to use "search" as the activation key word and then search for the following word "search".

private static void rec_speachRecogmized(object sender, 
    SpeechRecognizedEventArgs e)
        {
     if (r.StartsWith("search"))
         { 


     var spec = r.Replace("search", " "); 
        spec.Trim(); spec.Replace(" ", "+"); 
        speech.Speak("searching" + spec); 
        Process.Start("https://www.google.com/search? source=hp&q=" + 
        spec);
        }
         }
Rick Smith
  • 3,962
  • 6
  • 13
  • 24
  • see https://stackoverflow.com/help/minimal-reproducible-example. Please provide bug report and minimal code to reproduce your error. – Dr Yuan Shenghai Jun 09 '19 at 17:15

1 Answers1

0

You need to change this line:

Process.Start("https://www.google.com/search? source=hp&q=" + spec);

In:

Process.Start("https://www.google.com/search?q=" + spec);
fsdfff
  • 121
  • 8