Class Settings

java.lang.Object
net.idrnd.voicesdk.core.Settings

public class Settings extends Object
Provides a way to control global VoiceSDK configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns information (enabled features and expiration dates) about the installed license if available.
    static void
    setAllowMobileGPU(boolean allowMobileGPU)
    Sets whether GPU delegate allowed to be used for VoiceSDK (for Android devices only).
    static void
    setAllowMobileNNAPI(boolean allowMobileNNAPI)
    Sets whether NNAPI delegate allowed to be used for VoiceSDK (for Android devices only).
    static void
    setNumThreads(int numThreads)
    Sets the maximum number of threads available for VoiceSDK.
    static void
    setUseVoiceTemplateCompression(boolean useVoiceTemplateCompression)
    Sets whether to compress voice templates serialization.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Settings

      public Settings()
  • Method Details

    • setNumThreads

      public static void setNumThreads(int numThreads)
      Sets the maximum number of threads available for VoiceSDK. If 0 passed, then the optimal number of threads is detected automatically (the same effect is achieved if setNumThreads is not called).
      Parameters:
      numThreads - maximum number of threads available for VoiceSDK.
      Throws:
      VoiceSdkEngineException - on negative numThreads
    • setAllowMobileNNAPI

      public static void setAllowMobileNNAPI(boolean allowMobileNNAPI)
      Sets whether NNAPI delegate allowed to be used for VoiceSDK (for Android devices only).
      Parameters:
      allowMobileNNAPI - whether NNAPI is allowed to be used for VoiceSDK execution.
    • setAllowMobileGPU

      public static void setAllowMobileGPU(boolean allowMobileGPU)
      Sets whether GPU delegate allowed to be used for VoiceSDK (for Android devices only).
      Parameters:
      allowMobileGPU - whether GPU is allowed to be used for VoiceSDK execution.
    • setUseVoiceTemplateCompression

      public static void setUseVoiceTemplateCompression(boolean useVoiceTemplateCompression)
      Sets whether to compress voice templates serialization. Voice template compression is not used by default.
      Parameters:
      useVoiceTemplateCompression - whether to compress voice templates serialization.
    • getLicenseInfo

      public static LicenseFeatureInfo[] getLicenseInfo()
      Returns information (enabled features and expiration dates) about the installed license if available.
      Returns:
      Array of VoiceSDK features available with the installed license.