Important: The information in this document is obsolete and should not be used for new development.
SRProcessBegin
You can use theSRProcessBeginfunction 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
TheSRProcessBeginfunction causes the Speech Recognition Manager to provide the relevant feedback (in the feedback window associated with the recognizer specified by therecognizerparameter) 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
kSRWantsAutoFBGesturesproperty toFALSE, you should callSRProcessBeginat the beginning of your response to a recognition result andSRProcessEndat 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 valueTRUEin thefailedparameter (indicating that the recognition result cannot successfully be processed), the feedback character displays frowns, shrugs, or other appropriate gestures. In addition, whenfailedisTRUE, you do not need to callSRProcessEndto end the processing. If you pass the valueFALSEin thefailedparameter but determine subsequently that the recognition result cannot successfully be processed, you should callSRProcessEndwith thefailedparameter set toTRUE.SPECIAL CONSIDERATIONS
If the value of thekSRWantsAutoFBGesturesproperty of the specified recognizer isTRUE, the Speech Recognition Manager callsSRProcessBegininternally before notifying your application of a recognition result, and it callsSRProcessEndinternally after your application is notified. As a result, you should callSRProcessBeginorSRProcessEndonly when the value of the recognizer'skSRWantsAutoFBGesturesproperty isFALSE.Because the default value of the
kSRWantsAutoFBGesturesproperty isTRUE, most applications don't need to callSRProcessBegin. CallingSRProcessBeginis useful, however, when you know the resulting action might take a significant amount of time.