develop-27 9609 September 1996
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
PDF page 12
develop Issue 27 September 1996 10 Listing 1. Determining the Speech Recognition Manager version Boolean HasValidSpeechRecognitionVersion (void) { OSErr status; long theVersion; Boolean validVersion = false; const unsigned long kMinimumRequiredSRMVersion = 0x00000150; status = Gestalt(gestaltSpeechRecognitionVersion, &theVersion); if (!status) if (theVersion >= kMinimumRequiredSRMVersion) validVersion = true; return validVersion; } Listing 2. Initializing the Speech Recognition Manager /* Our global variables */ SRRecognitionSystem gRecognitionSystem = NULL; SRRecognizer gRecognizer = NULL; SRLanguageModel gTopLanguageModel = NULL; AEEventHandlerUPP gAERoutineDescriptor = NULL; OSErr InitSpeechRecognition (void) { OSErr status = kBadSRMVersion; /* Ensure that the Speech Recognition Manager is available. */ if (HasValidSpeechRecognitionVersion()) { /* Open the default recognition system. */ status = SROpenRecognitionSystem(&gRecognitionSystem, kSRDefaultRecognitionSystemID); /* Use standard feedback window and listening modes. */ if (!status) { short feedbackNeeded = kSRHasFeedbackHasListenModes; status = SRSetProperty(gRecognitionSystem, kSRFeedbackAndListeningModes, &feedbackNeeded, sizeof(feedbackNeeded)); } /* Create a new recognizer. */ if (!status) status = SRNewRecognizer(gRecognitionSystem, &gRecognizer, kSRDefaultSpeechSource); /* Install our Apple event handler for recognition results. */ if (!status) { status = memFullErr; (continued on next page)
Reading notes: Source is a technical magazine page with code listings; no advertised products or prices present. Page ends mid-listing with '(continued on next page)', so the reading order is incomplete.
- Printed dates
- September 1996
- Languages
- English