the unique customer identifier provided by SDK vendor.
This call will destroy the audio graph and worker along with all resources.
Ability to clear all models from local cache
Ability to configure sdk execution environment
configuration object
Get the output MediaStreamTrack object with denoise applied for further use.
Get Customer ID provided by vendor.
Get the currently configured LSNR stage-skipping options. Returns null when stage skipping was never configured (full denoising).
Get the input MediaStreamTrack the SDK is currently reading from.
Useful for checking what the browser actually applied to the capture —
getSettings() on it reports whether browser-side AGC, noise suppression
or echo cancellation ended up enabled, which changes what the SDK receives.
Returns the current output buffer latency in milliseconds. Updated every ~100ms. Returns 0 if the processor is not yet initialized.
The model files this SDK version needs, and where it will look for them.
Model file names are tied to the SDK version and change between releases —
speed has already moved from a .tsvb to a .wasm build, not just to a
new version number. If you host the models yourself, an SDK update can
therefore start asking for a file your folder does not have, and the only
symptom is that initialization never completes. Use this to check the
folder after upgrading, or at startup before the first call.
Call it after config(): url is resolved against the configured
sdk_url, so it only means something once that is set.
one entry per preset: the preset name, the path relative to
sdk_url, and the absolute URL that will be fetched.
Returns a snapshot of the adaptive speedup/jitter-buffer state for debugging. Updated every ~100ms. Returns null if the processor is not yet initialized.
Fields:
latencyMs — total pipeline latency (input + worker + output buffers)outputBufferMs — frames currently in the output ring bufferfloorMs — learned safe output-buffer floorminFloorMs — physical minimum floor derived from processing chunk sizelatencyMode — configured latency policy: auto, low, or stablelatencyProfile — currently active internal profileminInWindowMs — observed minimum in current 3s window (null if no data yet)isSpeedingUp — whether OLA speedup is currently activehadUnderrunInWindow— whether an underrun occurred in the current windowconsecutiveStableWindows — windows that stayed safely above floorcontextSampleRate — actual AudioContext rate (see the contextSampleRate config)modelSampleRate — rate the model runs at; differs from the context rate → resampling is activeThis object remains permanent throughout the entire lifetime of the SDK instance. When a new stream is provided as the source for processing, the SDK replaces the audio track within this MediaStream.
Returns whether the SDK is currently applying processing.
pass onError callback to ErrorBus
callback function that takes ErrorObject as its first argument.
Ability to preload all required resourses specified in config. This functionality make the initialization faster. Should be started after all configs are passet to sdk.config
Process an audio buffer and return the processed result. Only available when processorType is set to 'buffer'. Uses the current preset and sampleRate from configuration.
The Float32Array containing audio samples to process
The current sample rate of audio data
Promise
This call starts applying noise reduction effects to the configured audio track. This should be called only after the onReady callback has been triggered.
Ability to pass an AudioContext to the SDK. We use it to process audio frames in the Audio Worklet. If a context is not passed, the SDK will create a new context internally.
Set denoise power at runtime. Available only for the balanced preset.
the number parameter with range 0.0-1.0
Configure LSNR-based stage skipping in the denoise model at runtime. Available for the wasm presets (speed and balanced).
All thresholds are local SNR estimates in dB and must satisfy
noiseOnlyLsnrDb <= skipDfLsnrDb <= bypassLsnrDb; they are clamped otherwise.
Changes the denoise preset in real-time. Available presets:
The preset to use. Default is 'balanced'. Available options: 'speed', 'balanced', 'quality'.
The sample rate to use. Default is 32000. Available options: 16000, 32000, 44100, 48000.
'speed' and 'quality' presets are supported only with a sample rate of 16000.setPreset was called).This call stops applying noise reduction effects to the configured audio track and bypasses the original audio to the output. So, if you need to disable effects, you can just call stop and not touch the main logic related to WebRTC and MediaStreams. You can enable it again at any time by calling sdk.run().
Set the AudioTrack object to be the source of audio frames for processing. This call recreates the entire processing pipeline and loads all required resources. Once everything is loaded, the SDK calls the onReady callback.
the source MediaStreamTrack object.
Set the MediaStream object to be the source of audio frames for processing. This call recreates the entire processing pipeline and loads all required resources. Once everything is loaded, the SDK calls the onReady callback.
the source MediaStream object.
Generated using TypeDoc
Initiation of main SDK instance.