Home › Forums › OpenEars › setActive(TRUE/FALSE) method does not work › Reply To: setActive(TRUE/FALSE) method does not work
March 5, 2016 at 3:45 pm #1029716
setActive doesn’t start or stop listening. From the header and docs:
/**Start the speech recognition engine up. You provide the full paths to a language model and a dictionary file which are created using OELanguageModelGenerator and the acoustic model you want to use (for instance [OEAcousticModel pathToModel:@"AcousticModelEnglish"]).*/ - (void) startListeningWithLanguageModelAtPath:(NSString *)languageModelPath dictionaryAtPath:(NSString *)dictionaryPath acousticModelAtPath:(NSString *)acousticModelPath languageModelIsJSGF:(BOOL)languageModelIsJSGF; // Starts the recognition loop.
/**Shut down the engine. You must do this before releasing a parent view controller that contains OEPocketsphinxController.*/ - (NSError *) stopListening; // Exits from the recognition loop.
setActive prepares the shared OEPocketsphinxController to receive property settings, etc. From the header and docs:
/**This needs to be called with the value TRUE before setting properties of OEPocketsphinxController for the first time in a session, and again before using OEPocketsphinxController in case it has been called with the value FALSE.*/ - (BOOL)setActive:(BOOL)active error:(NSError **)outError;
I recommend using the tutorial: