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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
installASRBundle
(ArrayList<String> assetList, String targetDir) Installs ASR bundle with the given name in the app-based directory in the device filesystem.boolean
isASRBundleInstalled
(String asrBundleName, String targetDir) Checks if ASR Bundle is installed in the given directory.
-
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. 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:
assetList
- a list of strings that specify relative paths to the assets in ASR BundletargetDir
- path to the directory where the bundle will be installed- Returns:
- true if ASR Bundle was successfully installed, false otherwise
- Throws:
IOException
- if the directory does not exist or any of the bunde files could not be copied.
-
isASRBundleInstalled
Checks if ASR Bundle is installed in the given directory.- Parameters:
asrBundleName
- name of the ASR BundletargetDir
- target directory in which to check if the bundle is installed- Returns:
- true if ASR Bundle is installed in the given directory, false otherwise // TODO should pass the list of assets (so each one can be checked)
-