Tuesday, 6 May 2014

Semantic Issue - Use of undeclared identifier 'AcousticModel' error in OpenEars "Using LanguageModelGenerator" tutorial

Was playing with OpenEars for the first time, downloaded the framework, and followed the tutorial to setup the framework but as shown below it failed in the first "Using LanguageModelGenerator" tutorial straight away....what the..... The error is "Semantic issue - Use of undeclared identifier 'AcousticModel' "


Searched the net but couldn't find much info. Later worked out the fix by looking at other tutorials, simply add this line at the beginning and that fixed the problem.


#import <OpenEars/AcousticModel.h>

5 comments:

  1. Thanks for documenting this for others!

    ReplyDelete
  2. I stumbled upon this while trying to develop this in Swift. I just got it working in Swift with the following syntax (for those interested):

    let err:NSError = lmGenerator.generateLanguageModelFromArray(words, withFilesNamed: name, forAcousticModelAtPath: AcousticModel .pathToModel("AcousticModelEnglish"))

    Good luck!

    ReplyDelete
  3. missing 'OE' to the import
    #import
    #import

    ReplyDelete