The KeenASR SDK for Android includes support for the armeabi-v7a and arm64-v8a architectures.
To install the SDK, follow the steps below:
Prerequisite: Download the KeenASR SDK file and the ASR Bundle
- Download the SDK and ASR Bundle.
1. Add the KeenASR AAR file to your project
-
In Android Studio choose File > New > New Module > Import JAR/AAR Package and select the KeenASR.aar file; this creates the KeenASR module in your project.
-
Add build dependency: Choose File > Project Structure > Dependencies, then click the plus sign (+) at the bottom and choose Module Dependency > KeenASR. Click OK to finish.
2. Update the AndroidManifest.xml file
Add the following lines within the manifest element
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
3. Add the ASR Bundle to the app
-
Unpack the ASR Bundle you download on your local disk.
-
Choose File > New > Folder > Assets Folder > Finish to create the assets folder.
-
Copy the ASR Bundle you downloaded (e.g., keenB2mQT-nnet3chain-en-us) to the app/src/main/assets/ folder. You should end up with a
app/src/main/assets/keenB2mQT-nnet3chain-en-us
folder. Android studio will recognize the new folder and you should be able to see the assets/keenB2mQT-nnet3chain-en-us listed in the left-side navigation tree.