To install the KeenASR framework in your Objective C project perform the following steps:
1. Download the Latest Version of the Framework
-
Download the trial framework and ASR Bundle for iOS.
-
Unzip all the downloaded archives.
2. Add the Framework to your Project
-
Follow the Directions provided in the Apple’s iOS Developer Library.
-
In the project navigator, select the project or group within the project to which you want to add the framework.
-
Select the relevant target listed under TARGET label.
-
Scroll down to Embedded Binaries section, click on the plus sign (+) to add the KeenASR.framework.
3. Add the ASR Bundle to your Project
-
In the project navigator, select the project or group within a project to which you want to add the ASR Bundle.
-
Choose File > Add Files to “YOUR_APP_NAME”.
-
Click Options in the lower left and make sure Create folder references is checked.
-
Select the ASR bundle directory (for example, keenB2mQT-nnet3chain-en-us) and click Add.
4. Update Project Build Configuration Settings
-
As of version 1.5, the SDK is compiled with bitcode compilation enabled. For earlier versions you will need to disable bitcode compilation. To disable Bitcode Compilation under your project Build Settings, search for “Enable Bitcode” and set the parameter to NO.
-
Add the libc++.tbd library. Under Targets, choose your target, select the Build Phases tab, open Link Binary With Libraries, click the Plus Sign (+) and add the libc++.tbd library.
-
Under Targets, choose your target, select Build Settings tab, search for “c++”. Make sure that C++ Language Dialect is set to C++11, and the C++ Standard Library is set to libc++.
-
Add the Accelerate framework. Under Targets, choose your target, select the Build Phases tab, open the Link Binary With Libraries, click the Plus Sign (+) and add the Accelerate.framework.
5. Update the Privacy Settings for Microphone Access
As of iOS 10, Apple requires all apps that access the microphone to provide the user with a reason why your app needs to access the microphone. To support this requirement, a key must be placed in the Info.plist file. If this key is not specified the app will crash as soon as it tries to access the microphone (in this case, on initialization of the framework). Review these pages for more information.
To add the microphone access key:
-
Open the Info.plist file in your project.
-
Add the NSMicrophoneUsageDescription key.
-
Specify your description as the string value, for example, “The speech recognition feature in this app requires access to the microphone”.