O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recognizing Speech Using the Dictation and Web Search Grammars

The SpeechRecognizerUI uses the online dictation grammar by default if no grammar is added to its grammar set. In the following example, a SpeechRecognizerUI is created and its speech recognizer’s RecognizeAsync method is called. The speech recognizer returns the recognized text in Result property of the SpeechRecognitionResult object, as shown:

SpeechRecognizerUI recognizerUI = new SpeechRecognizerUI();SpeechRecognitionResult result;try{    result = await recognizerUI.Recognizer.RecognizeAsync();}catch (Exception ex){    // Handle unable to recognize speech...    return;}string recognizedText = result.Text;...

You can explicitly add the dictation, or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required