Export (0) Print
Expand All

Speech Recognition

The System.Speech.Recognition namespace provides functionality with which you can acquire and monitor speech input, create speech recognition grammars that produce both literal and semantic recognition results, capture information from events generated by the speech recognition and, and configure and manage speech recognition engines.

With the input functionality of speech recognition, your application can monitor the state, level, and format of the input signal, and receive notification about problems that might interfere with successful recognition. See Audio Input for Recognition.

You can create grammars programmatically using constructors and methods on the GrammarBuilder and Choices classes. The structure of grammars authored using these classes is independent of the Speech Recognition Grammar Specification (SRGS) 1.0. See Create Grammars Using GrammarBuilder.

To create grammars programmatically that conform to the SRGS specification, see Create Grammars Using SrgsGrammar. The classes of the System.Speech.Recognition.SrgsGrammar namespace map closely to the elements and attributes of the SRGS specification.

You can also create grammars using SRGS-compliant XML markup. See Create Grammars Using XML.

Use the constructors on the Grammar class to compile grammars created with any of the above methods into Grammar objects that the speech recognition can load and use to perform recognition.

Semantics

Recognition engines use the semantic information in grammars to interpret recognition results. To add semantic information to programmatically-created grammars, see Add Semantics to a GrammarBuilder Grammar. You can add semantic information to XML-format grammars using ECMAScript (JavaScript, JScript) in the tag elements. See Semantic Interpretation Markup. For information about semantic results returned by speech recognition engines, see Create and Access Semantic Content.

Debugging Tools

System.Speech includes special emulated recognition modes that allow you to provide text instead of audio to the speech recognition engine. You can use the simulated recognition results for debugging and optimizing speech recognition grammars. See Emulate Spoken Commands.

Your application can register for events that the speech recognition engine generates when completing important stages during speech processing such as loading grammars or recognizing speech. See Use Speech Recognition Events.

Using the members of the SpeechRecognitionEngine and SpeechRecognizer classes, you can select a speech recognition engine, configure its input, start and stop recognition, load and unload grammars, and modify properties of the speech recognition engine that affect recognition. See Initialize and Manage a Speech Recognition Engine.

Show:
© 2014 Microsoft