Enable Noise Suppression
Enables noise suppression on an active call leg to improve microphone audio quality in noisy environments.
Signature
// Callback version
fun enableNoiseSuppression(
callId: String,
callback: (Exception?) -> Unit
)
// Suspend version
suspend fun enableNoiseSuppression(
callId: String
)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
callId | string | Yes | Identifier of the active call |
Return Type
Returns void when the operation completes.
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 Type | Error Code | Description |
|---|---|---|
INTERNAL_ERROR | voice:error:no_call_found | No active call found for provided callId |
INTERNAL_ERROR | Media-layer errors | Media operation failed while enabling suppression |
UNKNOWN_ERROR | N/A | Unexpected failure |
For complete error reference and handling guidelines, see Error Reference.
Notes
- This action is available on Android and iOS
- Web SDK does not currently expose noise suppression call actions
- Apply this after call media is established for best effect
Related Actions
disableNoiseSuppression- Disable noise suppression for an active call
Related Events
onCallMediaError- Fired when media errors occur during a call