简体   繁体   中英

WP8 Voice Recognition UI Causing unhandled exception

SpeechRecognizerUI sr = new SpeechRecognizerUI();
sr.Settings.ListenText = "Say the recipient and body of the E-Mail";
sr.Settings.ExampleText = "Mom saying Happy Mother's Day";
//await Speak("Say the recipient and body of the E-Mail"); // TTS prompt
var recoResult = await sr.RecognizeWithUIAsync();
MessageBox.Show(recoResult.RecognitionResult.Text);

This throws an unhandled exeption and the WP8 app crashes. How do I fix this?

You may need to select a speech language goto phone SETTINGS then SPEECH .

In my settings the speech language is listed as none , once I selected a language ie English (United States) it seems to work.

Refer to this post

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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