Skip to content

Enable Noise Suppression ​

Enables noise suppression on an active call leg to improve microphone audio quality in noisy environments.

On Android and iOS this uses Vonage's on-device machine-learning noise suppression. On Web it enables the browser's built-in noiseSuppression audio processing on the call's microphone track.

Signature ​

// Callback version
fun enableNoiseSuppression(
  callId: String,
  callback: (Exception?) -> Unit
)

// Suspend version
suspend fun enableNoiseSuppression(
  callId: String
)

Parameters ​

ParameterTypeRequiredDescription
callIdstringYesIdentifier of the active call

Return Type ​

Returns void when the operation completes. On Web, returns a Promise that resolves once noise suppression has been applied.

Usage Example ​


// Callback
client.enableNoiseSuppression("callId") { err ->
    err?.let {
        println("Error enabling noise suppression: $it")
    } ?: println("Noise suppression successfully enabled")
}

// Coroutine
try {
    client.enableNoiseSuppression("callId")
} catch (e: Error) {
    println("Error enabling noise suppression: $e")
}

Errors ​

Error TypeError CodeDescription
INTERNAL_ERRORvoice:error:no_call_foundNo active call found for provided callId
INTERNAL_ERRORMedia-layer errorsMedia operation failed while enabling suppression
UNKNOWN_ERRORN/AUnexpected failure

For complete error reference and handling guidelines, see Error Reference.

Notes ​

  • Available on Android, iOS and Web
  • Apply this after call media is established for best effect
  • To apply noise suppression to every call rather than per call, set enableNoiseSuppression (Android/iOS) or noiseSuppression (Web) on the client config. It defaults to false
  • On Web this is currently marked experimental

Built with VitePress.