Audio Effects SDK for Android
Add real-time AI noise suppression to an Android app with the ai.effectssdk:audio package.
The Android Audio SDK processes PCM audio with on-device noise suppression. Android 8.1 (API 27) and newer, armeabi-v7a and arm64-v8a.
Before you start#
Register in the Developer Portal, start an Audio SDK trial and copy your Customer ID.
Add the dependency#
// build.gradle.kts
implementation("ai.effectssdk:audio:+")
Pin a version from the releases for production builds. Add the permissions:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
Authorize and create a pipeline#
val audioSdkFactory = AudioEffectsSDK.getAudioSdkFactory(context)
audioSdkFactory.auth(yourCustomerId) { licenseStatus ->
when (licenseStatus) {
LicenseStatus.ACTIVE -> {
val pipeline = audioSdkFactory.createAudioPipeline(PipelineConfig())
pipeline.enableNoiseSuppression(true)
}
LicenseStatus.INACTIVE, LicenseStatus.EXPIRED, LicenseStatus.ERROR -> showLicenseError()
}
}
Process audio#
val result = pipeline.process(yourAudioData)
Release#
pipeline.release()
audioSdkFactory.release()
Next steps#
View as Markdown · Found a problem? Tell us.