当我尝试将语言设置为SpeechRecognize(WP 8.1)时不起作用 [英] When I try to set a language to SpeechRecognize (WP 8.1) doesn't work

查看:68
本文介绍了当我尝试将语言设置为SpeechRecognize(WP 8.1)时不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当我尝试将语言设置为SpeechRecognize(Windows Phone 8.1)时,它会运行异常。但是在文档中告诉我按照我做D的方式进行操作;



这个有效:

   private   async  无效    Button_Click_1    object   sender      RoutedEventArgs   e    
{
var rec = SpeechRecognizer ();
await rec
CompileConstraintsAsync ();
rec
UIOptions AudiblePrompt = "Aguardando o comando" ;
var stream = await rec RecognizeWithUIAsync ();

}



这不起作用:

  私人  async  无效    Button_Click_1    object   sender      RoutedEventArgs   e    
{
var rec = SpeechRecognizer new Windows Globalization 语言 " pt -BR" ));
await rec
CompileConstraintsAsync ();
rec
UIOptions AudiblePrompt = "Aguardando o comando" ;
var stream = await rec RecognizeWithUIAsync ();

}



有人可以帮助我吗?

解决方案

你收到的具体例外情况是什么? ?



此外,您正在测试的系统上的SpeechRecognizer.SupportedTopicLanguages集的LanguageTags是什么?


When I try to set a language to SpeechRecognize (Windows Phone 8.1) it runs an exception. But in documentation tells me to do the way I'm doing D;

This works:

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();

        }

This doesn't work:

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();

        }

Someone PLEASE could help me ?

解决方案

What's the specific exception you're receiving?

Also, what are the LanguageTags of the set of SpeechRecognizer.SupportedTopicLanguages on the system you're testing on?


这篇关于当我尝试将语言设置为SpeechRecognize(WP 8.1)时不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆