Package com.keenresearch.keenasr
Class KASRBundle
java.lang.Object
com.keenresearch.keenasr.KASRBundle
An instance of the KASRBundle class, called asrBundle, manages ASR Bundle resources on the device
file system
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
installASRBundle
(String bundleName, String targetDir) Installs ASR bundle with the given name in the app-based directory in the device filesystem.
-
Constructor Details
-
KASRBundle
public KASRBundle(android.content.Context context) - Parameters:
context
- application context, where ASR Bundle is stored
-
-
Method Details
-
installASRBundle
Installs ASR bundle with the given name in the app-based directory in the device filesystem. ASR Bundle needs to be included in the APK file (typically, by being placed in the assets folder of the Android project. The app needs to have write access to the filesystem and there needs to be enough space on the device to install the ASR Bundle.- Parameters:
bundleName
- name of the ASR bundle to install to the app-based directory of the filesystemtargetDir
- path to the directory where the bundle will be installed- Returns:
- true if ASR Bundle was successfully installed, false otherwise
- Throws:
IOException
- if the targetDir directory does not exist, bundle with bundleName was not included in the APK fie, or if any of the bundle files could not be copied.
-