繁体   English   中英

Windows Phone 8语音识别异常

[英]Windows Phone 8 speech recognition exception

我正在使用Windows Phone 8应用。 我在语音识别方面面临问题。 这是我的代码。

SpeechRecognizerUI recoWithUI= new SpeechRecognizerUI();
try
{
    this.recoWithUI = new SpeechRecognizerUI();

    // Start recognition (load the dictation grammar by default).
    SpeechRecognitionUIResult recoResult = await recoWithUI.RecognizeWithUIAsync();

    // Do something with the recognition result.
    MessageBox.Show(string.Format("You said {0}.", recoResult.RecognitionResult.Text));

}
catch (Exception)
{

    throw;
}

每次我运行它时,它都会转到App.xaml.cs类并指出此问题

private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
    if (Debugger.IsAttached)
    {
        // An unhandled exception has occurred; break into the debugger
        Debugger.Break(); // It focuses on this line.
    }
}

您知道如何解决此问题吗? 谢谢

好,所以我明白了问题。一切都很好。 代码中没有问题问题是SpeechRecognizerUI类语言是en-Us,但是我的电话语言是en-UK,所以我所做的就是将我的Phone语言更改为en-Us,现在可以使用了。 谢谢

您是否在WMAppManifest.xml文件中启用了麦克风功能?

打开WMAppManifest.xml>功能选项卡>检查ID_CAP_MICROPHONE。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM