Skip to content

Bandwidth Extension Support

Akshay Agarwal edited this page Nov 13, 2024 · 1 revision

Bandwidth Extension Support in iOS SDK

This document provides an overview of the public APIs available in the v3.14 SDK for enhancing receiver-side audio quality for Webex and PSTN calls. The feature includes options for legacy noise removal and new speech enhancement techniques.

Overview

The Bandwidth Extension Support feature allows developers to enhance the audio quality on the receiver side during calls. This can be configured both before making a call and while in a call. This gives better calling experience to calling users when they talk to Non-Webex users such as PSTN/Phones etc..

Phone Class APIs

These APIs should be set before making a call.

Enable Legacy Receiver Noise Removal

This method enables or disables the legacy receiver-side noise removal. By default, the <B new receiver-side speech enhancement is enabled./B>

Usage Example

// Enable legacy receiver noise removal
Webex.phone.useLegacyReceiverNoiseRemoval(useLegacy: true)

// Disable legacy receiver noise removal to use new speech enhancement
Webex.phone.useLegacyReceiverNoiseRemoval(useLegacy: false)

Check if Speech Enhancement is Enabled

This property returns true if speech enhancement is enabled by default for all calls, otherwise returns false.

Usage Example

// Check if speech enhancement is enabled by default
let isEnabled = Webex.phone.isReceiverSpeechEnhancementEnabled
print("Is speech enhancement enabled by default: \(isEnabled)")

Enable/Disable Speech Enhancement by Default

This method enables or disables speech enhancement by default for all calls. It is applicable for WebexCalling and CUCM calling.

Usage Example

// Enable speech enhancement by default for all calls
Webex.phone.enableReceiverSpeechEnhancement(shouldEnable: true) { result in
    switch result {
    case .success:
        print("Speech enhancement enabled by default")
    case .failure(let error):
        print("Failed to enable speech enhancement: \(error)")
    }
}

// Disable speech enhancement by default for all calls
Webex.phone.enableReceiverSpeechEnhancement(shouldEnable: false) { result in
    switch result {
    case .success:
        print("Speech enhancement disabled by default")
    case .failure(let error):
        print("Failed to disable speech enhancement: \(error)")
    }
}

Call Class APIs

These APIs should be set while in a call.

Check if Speech Enhancement is Enabled

This property returns true if speech enhancement is enabled for the current call, otherwise returns false.

Usage Example

// Check if speech enhancement is enabled for the current call
let isEnabled = Webex.call.isReceiverSpeechEnhancementEnabled
print("Is speech enhancement enabled for the call: \(isEnabled)")

Enable/Disable Speech Enhancement for the Call

This method enables or disables speech enhancement for the current call. It is applicable for WebexCalling and CUCM calling.

Usage Example

// Enable speech enhancement for the current call
Webex.call.enableReceiverSpeechEnhancement(shouldEnable: true) { result in
    switch result {
    case .success:
        print("Speech enhancement enabled for the call")
    case .failure(let error):
        print("Failed to enable speech enhancement: \(error)")
    }
}

// Disable speech enhancement for the current call
Webex.call.enableReceiverSpeechEnhancement(shouldEnable: false) { result in
    switch result {
    case .success:
        print("Speech enhancement disabled for the call")
    case .failure(let error):
        print("Failed to disable speech enhancement: \(error)")
    }
}

Conclusion

The Bandwidth Extension Support feature in the iOS SDK provides developers with the tools to enhance audio quality on the receiver side for Webex and PSTN calls. By using the provided APIs, developers can enable or disable legacy noise removal and new speech enhancement techniques as needed.

Clone this wiki locally