![]() |
SRCallBackStruct |
Header: SpeechRecognition.h |
struct SRCallBackStruct { SInt32 what; SInt32 message; SRRecognizer instance; OSErr status; SInt16 flags; SInt32 refCon; };
A notification flag that indicates the kind of event that caused this notification to be issued. This field contains either kSRNotifyRecognitionBeginning or kSRNotifyRecognitionDone. See
If the value of the status field is noErr and the value of the what field is kSRNotifyRecognitionDone, this field contains a reference to a recognition result. Your callback routine can inspect the properties of this recognition result to determine what the user said.
Note that your callback routine must release this reference (by calling SRReleaseObject) when it is finished using it. If the value of the status field is not noErr, the value of this field is undefined.
A reference to the recognizer that issued this notification. You should not call SRReleaseObject on this recognizer reference in response to a recognition notification.
An error code indicating the status of the recognition. If the value of this field is noErr, the message field contains a reference to a recognition result. If the value of this field is kSRRecognitionDone and the value of the what field is kSRNotifyRecognitionDone, the recognizer finished without error but nothing belonging to that recognizer was recognized; in this case, the message field does not contain a reference to a recognition result. If the value of this field is any other value, some other error occurred.
Reserved for use by Apple Computer, Inc.
An application-defined reference constant. The value in this field is the value you passed in the refcon field of a callback routine parameter structure (of type SRCallBackParam).
When you receive a notification of recognition results through an application-defined callback routine (instead of using an Apple event handler), the Speech Recognition Manager sends your callback routine a pointer to a speech recognition callback structure, defined by the SRCallBackStruct data type.
For information on writing a speech recognition callback routine, see SRCallBackProcPtr.
© 2000 Apple Computer, Inc. (Last Updated 7/10/2000)