Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Speech Recognition Manager /
Chapter 1 - Speech Recognition Manager / Speech Recognition Manager Reference
Speech Recognition Manager Routines / Using the System Feedback Window


SRProcessBegin

You can use the SRProcessBegin function to indicate that a recognition result is being processed.

pascal OSErr SRProcessBegin (SRRecognizer recognizer, Boolean failed);
recognizer
A recognizer.
failed
A Boolean value that determines how the feedback gestures are to be altered and whether the response sound is to be played (FALSE) or not (TRUE).
DESCRIPTION
The SRProcessBegin function causes the Speech Recognition Manager to provide the relevant feedback (in the feedback window associated with the recognizer specified by the recognizer parameter) indicating that the application is in the process of responding to a spoken command. Currently, the gestures of the feedback character are changed to indicate that processing is occurring.

If you set the value of the recognizer's kSRWantsAutoFBGestures property to FALSE, you should call SRProcessBegin at the beginning of your response to a recognition result and SRProcessEnd at the end of your response. During the interval separating the two calls, the feedback character displays an appropriate set of gestures showing the user that the task is being processed. If you pass the value TRUE in the failed parameter (indicating that the recognition result cannot successfully be processed), the feedback character displays frowns, shrugs, or other appropriate gestures. In addition, when failed is TRUE, you do not need to call SRProcessEnd to end the processing. If you pass the value FALSE in the failed parameter but determine subsequently that the recognition result cannot successfully be processed, you should call SRProcessEnd with the failed parameter set to TRUE.

SPECIAL CONSIDERATIONS
If the value of the kSRWantsAutoFBGestures property of the specified recognizer is TRUE, the Speech Recognition Manager calls SRProcessBegin internally before notifying your application of a recognition result, and it calls SRProcessEnd internally after your application is notified. As a result, you should call SRProcessBegin or SRProcessEnd only when the value of the recognizer's kSRWantsAutoFBGestures property is FALSE.

Because the default value of the kSRWantsAutoFBGestures property is TRUE, most applications don't need to call SRProcessBegin. Calling SRProcessBegin is useful, however, when you know the resulting action might take a significant amount of time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997