VoiceProcessing

data class VoiceProcessing(val echoCancel: Boolean = true, val noiseSuppress: Boolean = true, val autoGain: Boolean = false, val applyOnIos: Boolean = true, val iosDucking: IosDucking = IosDucking.Default)(source)

Platform echo cancellation, noise suppression and gain control, applied before you get the audio.

  • Android: AcousticEchoCanceler, NoiseSuppressor and AutomaticGainControl, each only where the device provides it.

  • iOS: any of the three switches on voice processing on the input node, which always does echo cancellation and noise suppression together; autoGain only toggles its gain control. The result sounds like a phone call. Needs IosSessionCategory.PlayAndRecord.

For a lighter touch on Android without this class, try AndroidAudioSource.VoiceCommunication.

Constructors

Link copied to clipboard
constructor(echoCancel: Boolean = true, noiseSuppress: Boolean = true, autoGain: Boolean = false, applyOnIos: Boolean = true, iosDucking: IosDucking = IosDucking.Default)

Properties

Link copied to clipboard

Apply on iOS at all. Turn off to keep the Android effects while leaving iOS audio untouched, since Apple's processing changes the voice so much.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

How much iOS lowers other apps' audio while voice processing runs (iOS 17+).

Link copied to clipboard