NoiseDB
This document outlines the integration of Noise DB (NDB) level detection feature in JS SDK. Activation of the NDB feature involves initializing Krisp JS SDK with appropriate parameters, including the NDB model. Following initialization, the creation of a noise filter necessitates specifying NDB options such as active and inactive durations. NDB results are obtained by registering an event listener for ndb_callback, providing users with state changes rather than per-frame updates to mitigate CPU impact.
The average CPU usage with ndb: { active_duration: 100, inactive_duration: 400} is ~15.5% (of which NC takes up ~14%).
To activate the VAD feature the following steps are required
- [Init] pass NDB model to Krisp SDK
krispSDK = new KrispSDK({
params: {
..., //other params
models: {
model32: '/dist/models/model_32.kw',
...,
**modelNDB: '/dist/models/model_ndb.kw',**
}
}
});
await krispSDK.init();2.[CreateNoiseFilter] provide NDB optons when creation noise filter
const params ={
...., //other params
useNDB: true;
ndb :{
active_duration: 100,
inactive_duration: 400,
}
}
filterNode = await krispSDK.createNoiseFilter(params,...);useNDB: enable flag
options:
active_duration: NDB algorithm is active (100 mean 1 sec ~ 100 frames)
inactive_duration: NDB algorith is inactive during that period and reset is called
- [Result] to read NDB result register
ndb_callback
filterNode.addEventListener('ndb_callback', (e) => {
console.log("NDB_RESULT is", e.data.data);
});❗Note that we send the result to the user only when the state changes, as sending the result for each frame is CPU-intensive.
Updated about 20 hours ago
