The intelligent noise reduction feature is provided in Push SDK V4.4.9 and later. You can use the feature to improve the stream ingest experience in various scenarios. This topic describes how to use the feature in Push SDK for Android.

Usage notes

  • Push SDK provides regular noise reduction and intelligent noise reduction. They are mutually exclusive, and you can use only one of them.
  • If the intelligent noise reduction component is not properly integrated, you cannot use the intelligent noise reduction feature.
  • If you need libraries of other instruction sets, contact technical support for assistance. For more information, see Development support.

Environment requirements

  • Android Studio is installed. To download Android Studio, visit the Android Studio download page.
  • The version of the Android Native Development Kit (NDK) is r14 or later. For information about other environment requirements, see Demo compilation.

Integration

  1. Create an Android Studio project. For more information, visit the page that describes how to create a project in Android Studio.
  2. Integrate Push SDK. For more information, see SDK integration.
    Note You must integrate Push SDK V4.4.9 or later. For information about how to download Push SDK, see SDK download and release notes.
  3. Integrate the intelligent noise reduction component.

    Add the following code to the dependencies block in the build.gradle file:

    implementation 'com.alivc.live.component:intelligentdenoise:1.0.0'
  4. Compile the code. If the compilation is successful, the intelligent noise reduction component is integrated.
    If you encounter compilation conflicts caused by duplicate .so files, fix the error by using the pickFirst syntax. The following sample code provides an example in the build.gradle file of the demo project.
    android {
        packagingOptions {
            pickFirst '**/libc++_shared.so'
            pickFirst '**/libMNN.so'
        }
    }

    Example of an error that is reported when the compilation fails:

    Caused by: com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'lib/arm64-v8a/lib???.so'

Use the feature

You can call relevant methods to use the intelligent noise reduction feature.

  • Enable intelligent noise reduction.
    mAlivcLivePusher.startIntelligentDenoise();
  • Disable intelligent noise reduction.
    mAlivcLivePusher.stopIntelligentDenoise();

You can also use the demo of Push SDK to try the intelligent noise reduction feature. For information about how to download the demo, see Push SDK demo.