在我的WP 8应用程序中使用SpeechRecognizerUI导致它意外崩溃? [英] using SpeechRecognizerUI in my WP 8 app causing it crash unexpectedly?

查看:118
本文介绍了在我的WP 8应用程序中使用SpeechRecognizerUI导致它意外崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是windows phone app开发的新手。我正在尝试使用SpeechRecognizerUI类构建一个简单的语音识别应用程序。但问题是每当我尝试在我的Lumia 520设备中调试应用程序(在8.1平台上工作)时,它会像往常一样加载监听器,然后调试器在一秒钟内加载的同时自动停止,不要让我足够是时候说一句话。我从谷歌搜索2天,但没有任何帮助。我在我的应用程序的MainPage.xml上提供了一个按钮,我给出了以下代码。



I am new to windows phone app development. I am trying to build a simple speech recognition app using SpeechRecognizerUI class. But the problem is whenever i try to debug the app in my Lumia 520 device(working on 8.1 platform), it load the listener as usual and then debugger stopped automatically at the same time it load within a second, don't allow me sufficient time to speak even a single word. I am googling since 2 days but got nothing helpful. I have provided a single button on "MainPage.xml" of my app for which i have given the following code.

namespace Kundali
    {
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();  
        }
        private async void button_Click(object sender, RoutedEventArgs e)
        {
            SpeechRecognizerUI sprec = new SpeechRecognizerUI();
            SpeechRecognitionUIResult result = await sprec.RecognizeWithUIAsync();
            MessageBox.Show(string.Format("You said {0} ", result.RecognitionResult.Text));  
        }
    }









我试图处理catch处理程序中的异常它显示异常无法找到与此错误代码相关联的文本甚至没有收听单个文本。有人请帮助我。





When i tried to handle the exception in catch handler it shows the exception "The text associated with this error code could not be found" not even listening the single text. Some one please help me.

推荐答案

我有同样的问题



HResult = -2147199556



System.Exception



找不到与此错误代码关联的文本。

不支持所请求的语言。
I have the same issue

HResult = -2147199556

System.Exception

The text associated with this error code could not be found.
The requested language is not supported.


这篇关于在我的WP 8应用程序中使用SpeechRecognizerUI导致它意外崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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