Skip to content

Bandwidth Extension Support

ciscoRankush edited this page Nov 12, 2024 · 1 revision

Bandwidth Extension Support in Android 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 new receiver-side speech enhancement is enabled.

Usage Example

// Enable legacy receiver noise removal
webex.phone.useLegacyReceiverNoiseRemoval(true)

// Disable legacy receiver noise removal to use new speech enhancement
webex.phone.useLegacyReceiverNoiseRemoval(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
var isEnabled = webex.phone.isReceiverSpeechEnhancementEnabled()
Log.d("Speech enhancement is 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(true) { 
    if (it.isSuccessful) {
        // Speech Enhancement was successfully set
    }
    else {
       // Handle error
        Log.d("Failed to enable speech enhancement by default: ${it.error?.errorMessage}")
    }
}

// Disable speech enhancement by default for all calls
webex.phone.enableReceiverSpeechEnhancement(false) { 
    if (it.isSuccessful) {
        // Speech Enhancement was successfully set
    }
    else {
        // Handle error
        Log.d("Failed to disable speech enhancement by default: ${it.error?.errorMessage}")
    }
}

Call Class APIs

These APIs should be set while in a call. Call object can be obtained as a result of webex.phone.dial API or it is notified in IncomingCallListener.onIncomingCall API for an incoming 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
var isEnabled = call.isReceiverSpeechEnhancementEnabled
Log.d("Speech enhancement is enabled: $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
call.enableReceiverSpeechEnhancement(true) {
    if (it.isSuccessful) {
        // Speech Enhancement was successfully set
    }
    else {
        // Handle error
        Log.d("Failed to enable speech enhancement: ${it.error?.errorMessage}")
    }
}

// Disable speech enhancement for the current call
call.enableReceiverSpeechEnhancement(false) { 
    if (it.isSuccessful) {
        // Speech Enhancement was successfully set
    }
    else {
        // Handle error
        Log.d("Failed to disable speech enhancement: ${it.error?.errorMessage}")
    }
}

Conclusion

The Bandwidth Extension Support feature in the Android 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