Windows Phone 8中的语音识别

rid*_*doy 7 c# speech-recognition windows-phone-8

教程之后,我正在WP8.I代码中进行语音识别的示例程序,如:

public async void SpeechToText_Click(object sender, RoutedEventArgs e)
{
  SpeechRecognizerUI speechRecognition=new SpeechRecognizerUI();
  SpeechRecognitionUIResult recoResult=await speechRecognition.RecognizeWithUIAsync();

if (recoResult.ResultStatus == SpeechRecognitionUIStatus.Succeeded)
  {
    MessageBox.Show(string.Format("You said {0}.", recoResult.RecognitionResult.Text));
  }
}
Run Code Online (Sandbox Code Playgroud)

运行程序后,我总是面对一条消息" 我们很抱歉,但我们现在无法访问网络 ",一个声音说.
是否需要互联网连接?我检查我的互联网连接但是它很好,那么问题是什么,有人可以解释吗?这是模拟器问题还是我错过了什么?

ste*_*g89 3

语音识别需要访问 Microsoft 云服务。许多人在让模拟器与支持互联网的应用程序正常运行时遇到问题。这是有关解决该问题的 MSDN 文章。如果我是您,我会验证您实际上可以使用简单的方法在模拟器上访问互联网WebBrowser并尝试导航到您选择的网站。如果您无法访问外部站点,则语音识别功能将无法在您的模拟器上运行。