Important: The information in this document is obsolete and should not be used for new development.
SRProcessBegin
You can use theSRProcessBegin
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
TheSRProcessBegin
function causes the Speech Recognition Manager to provide the relevant feedback (in the feedback window associated with the recognizer specified by therecognizer
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 toFALSE
, you should callSRProcessBegin
at the beginning of your response to a recognition result andSRProcessEnd
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 valueTRUE
in thefailed
parameter (indicating that the recognition result cannot successfully be processed), the feedback character displays frowns, shrugs, or other appropriate gestures. In addition, whenfailed
isTRUE
, you do not need to callSRProcessEnd
to end the processing. If you pass the valueFALSE
in thefailed
parameter but determine subsequently that the recognition result cannot successfully be processed, you should callSRProcessEnd
with thefailed
parameter set toTRUE
.SPECIAL CONSIDERATIONS
If the value of thekSRWantsAutoFBGestures
property of the specified recognizer isTRUE
, the Speech Recognition Manager callsSRProcessBegin
internally before notifying your application of a recognition result, and it callsSRProcessEnd
internally after your application is notified. As a result, you should callSRProcessBegin
orSRProcessEnd
only when the value of the recognizer'skSRWantsAutoFBGestures
property isFALSE
.Because the default value of the
kSRWantsAutoFBGestures
property isTRUE
, most applications don't need to callSRProcessBegin
. CallingSRProcessBegin
is useful, however, when you know the resulting action might take a significant amount of time.