Application Execution
At execution time, the grammars in the
SpeechStudio resource script are managed by the SpeechStudio Control. This
ActiveX control must be present in any application component that is to be a
client of speech recognition. The SpeechStudio help details how to declare a
control in source code. One special case is if the application has a dialog or
form that is being voice activated, then the SpeechStudio control can be dragged
onto the dialog just like any other control. The control will be created
automatically when its container is activated.
The SpeechStudio Control method VBStart (Start
for VC++) is called whenever a grammar should be activated. In response to this
call, the control performs final compilation of the grammar, incorporating any
dynamic content, and then communicates the result to SpeechPlayer, which manages
the voice recognition engine by loading and unloading grammars and by reacting
to recognition information and events. SpeechPlayer and the SpeechStudio control
work together to make sure the speech recognition engine is focused on the
correct grammars for one application at a time. The application directs the
entire operation by calling the control's methods.
When a recognition occurs, SpeechPlayer
communicates the recognition information to the SpeechStudio control which will
perform the associated actions, as specified in the original pattern. If the
action is FireRecognized then the recognized event (or message) is delivered to
the application, which performs the desired function. All the possible actions
are described in the SpeechStudio control API, part of the SpeechStudio
documentation.
Next: SpeechStudio
Control API
|