Added in API level 16

NoiseSuppressor


open class NoiseSuppressor : AudioEffect
kotlin.Any
   ↳ android.media.audiofx.AudioEffect
   ↳ android.media.audiofx.NoiseSuppressor

Noise Suppressor (NS).

Noise suppression (NS) is an audio pre-processor which removes background noise from the captured signal. The component of the signal considered as noise can be either stationary (car/airplane engine, AC system) or non-stationary (other peoples conversations, car horn) for more advanced implementations.

NS is mostly used by voice communication applications (voice chat, video conferencing, SIP calls).

An application creates a NoiseSuppressor object to instantiate and control an NS engine in the audio framework.

To attach the NoiseSuppressor to a particular android.media.AudioRecord, specify the audio session ID of this AudioRecord when creating the NoiseSuppressor. The audio session is retrieved by calling android.media.AudioRecord#getAudioSessionId() on the AudioRecord instance.

On some devices, NS can be inserted by default in the capture path by the platform according to the android.media.MediaRecorder.AudioSource used. The application should call NoiseSuppressor.getEnable() after creating the NS to check the default NS activation state on a particular AudioRecord session.

See android.media.audiofx.AudioEffect class for more details on controlling audio effects.

Summary

Inherited constants
Public methods
open static NoiseSuppressor!
create(audioSession: Int)

Creates a NoiseSuppressor and attaches it to the AudioRecord on the audio session specified.

open static Boolean

Checks if the device implements noise suppression.

Inherited functions
Inherited properties

Public methods

create

Added in API level 16
open static fun create(audioSession: Int): NoiseSuppressor!

Creates a NoiseSuppressor and attaches it to the AudioRecord on the audio session specified.

Parameters
audioSession Int: system wide unique audio session identifier. The NoiseSuppressor will be applied to the AudioRecord with the same audio session.
Return
NoiseSuppressor! NoiseSuppressor created or null if the device does not implement noise suppression.

isAvailable

Added in API level 16
open static fun isAvailable(): Boolean

Checks if the device implements noise suppression.

Return
Boolean true if the device implements noise suppression, false otherwise.