About Us    Products    Store    Support    Download    Contact 

 

How Does SpeechStudio Work?

SpeechStudio presents a grammar editor used to create and modify grammars. A grammar describes a collection of phrases for which the speech recognition engine should be listening. A SpeechStudio grammar also specifies what action in the application should be performed for each phrase of the grammar.

Grammars can be associated with clients or component controls of clients. The following grammar snippet is associated with the OK button on some client dialog. The only phrase to recognize is the word "OK". If this word is recognized the action to perform is to press the OK button.

A grammar consists of multiple patterns. Each pattern has a <pattern> part that specifies words and phrases a user can speak and an <action> part that defines the effect of a recognition. Actions are methods or events visible to the application. Some actions may be associated with GUI elements (like the OKButton.Press() in the example above). To simplify the voice control of GUI elements, SpeechStudio can display an image of any form (dialog) or menu of your application, like the form (dialog) or menu editor. You select an element of this image and request a pattern be added to the grammar whose actions are focused on this item, i.e., a control or a menu item. You will then choose one of the actions the SpeechStudio control supports on that item as the action and add phrases to the pattern.

Some actions are generic voice recognition actions with no GUI counterpart. In the following example there are two generic actions. GetPhraseList is an action in the <pattern> part used in this case to retrieve the currently available list of CD's categorized as Blues:

GetPhraseList(Blues) returns a list of phrases and each phrase is preceded by the word "play". Example phrases this pattern might recognize would be "play Hank Williams", "play Tab Benoit", "play B B King", etc. The action FireRecognized causes the SpeechStudio control's recognized event to be delivered to the application tagged with the name "Blues". Attached to the recognized event is the recognized text along with a recognition quality score and other data that the application may consult. The application could use the recognized text to select a CD to play. As an alternative to delivering ActiveX control events, the SpeechStudio control can be instructed to send Windows messages to the application.

One "Grammar" is the combination of the <pattern> snippets in a grammar file. When the application is running, multiple patterns from multiple grammars may be active at the same time. More than one pattern could be recognized at any given time. SpeechStudio provides precise control over which patterns can be recognized.

SpeechStudio keeps track of all grammars and their status in the SpeechStudio Project file. SpeechStudio compiles the annotated grammars used by the application's VUI into a Windows resource script, just like the .rc file in the Visual C++ project. The SpeechStudio resource script contains the compiled grammars from the grammar files and information to call actions. When a Visual C++ application is built, the resource compiler compiles the SpeechStudio resource script and the resulting resources become part of the application executable. For Visual Basic projects, SpeechStudio takes care of compiling the resource script into a resource-only DLL which is referenced by the application.

Next: Application Execution

© 2001-2005 SpeechStudio Inc.  All Rights Reserved.

Privacy Policy