0

以下代码返回一个空的搜索查询,我需要使用“搜索”作为激活关键字,然后搜索以下单词“搜索”。

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);
        }
         }
4

1 回答 1

0

您需要更改此行:

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

在:

Process.Start("https://www.google.com/search?q=" + spec);
于 2019-06-09T17:41:50.127 回答