Skip to main content

Usage

SDK Initialization

To use the SDK, you must initialize a single instance of DHDenoiser for noise reduction. You can set the necessary values for initialization using the DHDenoiserConfig.Builder.

String LICENSE_KEY = "YOUR_LICENSE_KEY"

DHDenoiserConfig denoiserConfig = new DHDenoiserConfig.Builder(LICENSE_KEY).build();

DHDenoiser.init(this, denoiserConfig);

License Expiration Check

If the license key is invalid or expired, the noise reduction feature will not work via the process function. After initialization, you can use the isExpired function to check if the license is valid.

if (DHDenoiser.isExpired()) {
Log.e("DHDenoiser", "SDK has expired");
}

Noise Reduction

Once initialization is complete, you can use the process function to remove noise.

int frameSize = 128; // default size
float[] input = new float[frameSize];
float[] output = new float[frameSize];

DHDenoiser.process(input, output);