Class KASRBundle

java.lang.Object
com.keenresearch.keenasr.KASRBundle

public class KASRBundle extends Object
An instance of the KASRBundle class, called asrBundle, manages ASR Bundle resources on the device file system
  • Constructor Details

    • KASRBundle

      public KASRBundle(android.content.Context context)
      Parameters:
      context - application context, where ASR Bundle is stored
  • Method Details

    • installASRBundle

      public boolean installASRBundle(ArrayList<String> assetList, String targetDir) throws IOException
      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 Bundle
      targetDir - 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

      public boolean isASRBundleInstalled(String asrBundleName, String targetDir)
      Checks if ASR Bundle is installed in the given directory.
      Parameters:
      asrBundleName - name of the ASR Bundle
      targetDir - 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)