我正在做一个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.
}
}你知道如何解决这个问题吗?谢谢
发布于 2014-12-02 03:40:14
好的,所以我有问题了,每件事都很好。在代码中没有问题,问题是SpeechRecognizerUI类语言是en-Us,但是我的电话语言是en-UK,所以我所做的只是将我的电话语言改为en-Us,现在它起作用了。谢谢
发布于 2014-11-23 21:38:09
您是否在WMAppManifest.xml文件中启用了麦克风功能?
打开WMAppManifest.xml > Capabilities选项卡>检查ID_CAP_MICROPHONE。
https://stackoverflow.com/questions/27043765
复制相似问题