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(String bundleName, String targetDir) throws IOException
      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 filesystem
      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 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.