cn.seastart.rtc:denoise is an AI noise suppression plugin based on DeepFilterNet3. It uses the same algorithm, model, and parameters as the Web DeepFilterNet noise suppression plugin, so it sounds the same on every platform. It implements the SDK’s AudioCaptureProcessor interface and takes effect once attached with RTCEngine.setAudioCaptureProcessor, with suppression strength adjustable at runtime and a temporary bypass.
The plugin is a separate, optional dependency, available since RTC 2.0.39. Apps that don’t use AI noise suppression don’t need it.
1. Add the dependency
- The plugin depends transitively on
cn.seastart.rtc:rtcand requires RTC2.0.39or later. - The plugin supports
arm64-v8aandarmeabi-v7a, the same as the SDK. - The model is built into the plugin; you don’t need to copy any extra resources.
2. Enable and disable
3. API
4. Unsupported devices and CPU overload
AI noise suppression needs a certain amount of CPU power. The SDK handles this in two layers:- Before enabling: only devices with low-performance little cores (common in some TVs, set-top boxes, and entry-level phones) are unsupported. On them
isSupported()returnsfalseand the constructor throwsDenoiseNotSupportedException(102032). Check first and only then show the switch, rather than reporting an error after the user taps it. - During a call: if the device stays overloaded (for example, while running other heavy workloads), the plugin switches to bypass automatically so the call doesn’t stutter, and calls
overloadListener. Tell the user something like “Device too slow; noise suppression paused” and let them decide whether to callsetEnabled(true)to turn it back on.
5. Notes
- When attached, the SDK turns off the system’s and WebRTC’s built-in noise suppression and restores it on detach, so two layers of suppression don’t stack and muffle the voice. Echo cancellation and automatic gain control are unaffected. This switch rebuilds microphone capture once, leaving a gap of less than half a second. To turn suppression off temporarily, use
setEnabled(false), which doesn’t rebuild capture. - The model loads in the background (usually in under 1 second). Until it’s loaded, audio passes through unchanged and capture isn’t blocked.
- It works only with 48 kHz mono capture; other capture formats pass through unchanged.
- Local volume (
getVolume, speaker levels) reflects the volume before noise suppression. setAudioCaptureProcessorholds only one processor, applied to all channels;releaseSDK()doesn’t clear it.- License: DeepFilterNet itself is Apache-2.0/MIT; verify the license of the model weights yourself before distribution.
6. Custom capture processors
TheAudioCaptureProcessor interface the plugin implements can also be used to plug in your own audio algorithms (noise suppression, voice changing, and so on). The processor processes each PCM frame in place on the SDK capture thread; the processed data is then distributed to all channels, and the local audio frame callback also receives the processed data.
- Exceptions thrown from
processare caught and logged by the SDK, and that frame is sent unchanged. AudioProcessingConstraintshas the same meaning as the same-named type in the Web and Swift SDKs. Android currently handles onlynoiseSuppression;echoCancellationandautoGainControlkeep the SDK defaults.- For interface details, see RTCEngine.setAudioCaptureProcessor and Types.