PrepAway - Latest Free Exam Questions & Answers

How should you complete the code?

DRAG DROP
You are developing a Universal Windows Platform (UWP) app.
You need to ensure that the app can respond to speech.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets.Each element may be used once, more than once, or not at all. You may need to drag the split bar between
panes or scroll to view content.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Similar example:
private async void StartRecognizing_Click(object sender, RoutedEventArgs e)
{
// Create an instance of SpeechRecognizer.
var speechRecognizer = new Windows.Media.SpeechRecognition.SpeechRecognizer();
// Compile the dictation grammar by default.
await speechRecognizer.CompileConstraintsAsync();
// Start recognition.
Windows.Media.SpeechRecognition.SpeechRecognitionResult speechRecognitionResult = await
speechRecognizer.RecognizeWithUIAsync();
// Do something with the recognition result.
var messageDialog = new Windows.UI.Popups.MessageDialog(speechRecognitionResult.Text, “Text spoken”);
await messageDialog.ShowAsync();
}

https://msdn.microsoft.com/en-us/library/windows/apps/mt185615.aspx

One Comment on “How should you complete the code?

  1. GP says:

    The answer is correct, but for some computers with other native language for example Polish it doesn’t work.

    Before run this source code, you have to do changes in control panel:
    1) you have to switch to English
    2) download language pack
    3) download void recoginition data
    4) active Cortana in Control Panel




    0



    0

Leave a Reply