下面的代码返回一个空的搜索查询,我需要使用" search“作为激活关键字,然后搜索下面的单词" 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);
}
}
发布于 2019-06-10 01:41:50
您需要更改此行:
Process.Start("https://www.google.com/search? source=hp&q=" + spec);
在:
Process.Start("https://www.google.com/search?q=" + spec);
https://stackoverflow.com/questions/56516421
复制相似问题