Looking at the source, it appears the failure happens inside ContinuousModel.m prepareTestAndOpenAudioDevice method. At this point it fails to open an audio device and posts a PocketsphinxContinuousSetupDidFail notification. performContinuousFailureStopForIssue: never gets called.
If I work my way back, prepareTestAndOpenAudioDevice is called within listeningLoopWithLanguageModelAtPath:dictionaryAtPath:acousticModelAtPath:languageModelIsJSGF: at which point isListening=YES; prepareTestAndOpenAudioDevice fails and subsequently causes listeningLoopWithLanguageModelAtPath:… to return immediately.
Hopefully that is of some help in the future, after WWDC.
Sorry, not quite following this yet – why is it being set to nil while it is calibrating and/or why is it calibrating while it is stopping?
This is mostly for robustness. For example I have a button that allows toggling pocketsphinxController listening (start/stop listening). Because I ran into the issue above I am trying to nil the controller when the user toggles the button to off/stop. In fact this may be the way to go anyways to clear up resources. This presents the problem where the user can toggle the switch off while the controller is calibrating, etc.
Am I always guaranteed that pocketsphinxDidStopListening and/or pocketSphinxContinuousSetupDidFail will fire in the event that the controller fails?
Then I could safely nil the controller if something went wrong and allow the user or system to toggle listening back on (which would start with a fresh controller).
Viewing 1 post (of 1 total)
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.