🌐 JS SDK v1.1.2: BVC

Release date: 08 September, 2023

What's New

βž• New functionality

  • Added support for Background voice cancellation (BVC)
  • Auto Mode (UserMedia Class)

πŸ’Ÿ Enhancements

  • Added a possibility to download and cache SDK models before creating filter node.

Background voice cancellation (BVC)

Background Voice Cancellation (BVC) technology is developed to cancel background voices. It also removes all background noises. The technology does not require user voice enrollment or training on user voice data.

BVC technology is designed to work with any headset and earbud. It works best with wired USB headsets with a boom microphone and is also compatible with most Bluetooth headsets, including AirPods.

The BVC feature comes with a built-in list of allowed and blocked devices, which makes the integration process seamless. To use it, a few configuration changes are required, such as setting the useBVC flag, pointing to the allowed device list file, and passing a stream argument while creating a noise filter.

Additionally, the SDK provides the possibility to define a custom list of allowed BVC devices. To add a new BVC-compatible device, there are two options:

  • Creating an external file with the list of allowed devices and providing it while initializing the KrispSDK.
  • Modifying the list of allowed devices during runtime using KrispSDK.BVC.add(deviceName: string, force?: boolean) and KrispSDK.BVC.remove(deviceName: string).

A new method, isBVCEnabled(): boolean, has also been added, which determines if BVC is functioning for the current filter node.

More details are available in the BVC JS Integration Guide.

For details about the Licensing terms of BVC please contact us.

Auto Mode (UserMedia class)

The auto mode feature has been introduced to simplify the integration process. Generally auto mode is an all-in-one UserMedia class which handles stream loading related functionality. In most cases, there is no need to deal with AudioContext and under the hood interfaces. This feature provides a new layer for those who simply need MediaStream for connecting dots together.

UserMedia class provides dynamic device switching: By calling the loadUserMedia function with different device parameters, you can dynamically switch between audio/video devices. The userMedia.stream object will automatically update to the corresponding tracks, eliminating the need to create a new stream. Additionally it will switch to default microphone in case selected device was unplugged or not available.

In case you need to obtain new stream every time you can switch singleStream flag to false. By setting it false you need to listen for ******************streamchange****************** event. You can find reference in autoMode example.

UserMedia class automatically enables Noise Cancellation: While calling userMedia.loadUserMedia(constraints, { enableOnceReady: boolean }) you can set enableOnceReady flag to automatically enable NC filter once filterNode is loaded.

You may refer to the BVC JS Integration Guide for a sample code.

Cache SDK models

While initializing SDK instance there is a new preload option, which tells SDK to preload and cache model during initialization. If you are planning to use BVC, this could be handy as BVC model is bigger than NC models and to save on network download time you can cache model upfront.

krispSDK = new KrispSDK({
    params: {
			...
****      models: {
				...
        **model32: {
					url: "/dist/models/model_bvc.kw",
					preload: true // in case you want to preload model upfront you can use this structure
				}**
      }
    },
});