当我尝试将语言设置为 SpeechRecognize (Windows Phone 8.1) 时,它会运行异常。但是在文档中告诉我按照我正在做的方式做 D;
这有效:
private async void Button_Click_1(object sender, RoutedEventArgs e)
{
var rec = new SpeechRecognizer();
await rec.CompileConstraintsAsync();
rec.UIOptions.AudiblePrompt = "Aguardando o comando";
var stream = await rec.RecognizeWithUIAsync();
}
这不起作用:
private async void Button_Click_1(object sender, RoutedEventArgs e)
{
var rec = new SpeechRecognizer(new Windows.Globalization.Language("pt-BR"));
await rec.CompileConstraintsAsync();
rec.UIOptions.AudiblePrompt = "Aguardando o comando";
var stream = await rec.RecognizeWithUIAsync();
}
有人可以帮助我吗?