ANS
Ambient noise suppression (ANS) recognizes and clears background noise to enhance the quality of recorded audio and user experience. This feature is better at suppressing continuous noise, such as rain sounds and other white noise .
To use this feature, contact ZEGOCLOUD technical support to enable it. Pro or Enterprise users can enable it free of charge.
Prerequisites
Before you implement the ANS
feature, make sure that the following conditions are met:
- You have implemented Integrate the ZIM Audio SDK.
- You have implemented Implement online authentication.
Enable the feature
After the initialization, call the enableANS method to enable the feature.
// Enable the ANS feature.
ZIMAudio.sharedInstance().enableANS(true);
After the feature is enabled, you can start recording audio files. For more information, see Send and receive audio messages.
If the ANS feature is enabled after recording starts, this feature does not take effect for this recording and takes effect for subsequent recordings only.
(Optional) Set ANS parameters
To change the ANS mode after enabling the ANS feature by calling the enableANS method, call the setANSParam method.
// Change the ANS mode to aggressive.
ZIMAudioANSParam param = ZIMAudioANSParam(ZIMAudioANSMode.aggressive);
ZIMAudio.getInstance().setANSParam(param);