feat: decouple noise gate and VAD, pre-warm model for instant enable
Noise gate and Silero VAD now work fully independently — the worklet attaches when either is enabled and bypasses the amplitude gate when only VAD is on (noiseGateActive flag). SileroVADGate gains a two-phase lifecycle: init(ctx) loads the ONNX model eagerly when the AudioContext is first created; start(stream) is then near-instant when the user enables VAD. stop() pauses without unloading the model so re-enabling is also instant. VAD checkbox no longer requires the noise gate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import { logger } from "matrix-js-sdk/lib/logger";
|
||||
const log = logger.getChild("[NoiseGateTransformer]");
|
||||
|
||||
export interface NoiseGateParams {
|
||||
noiseGateActive: boolean;
|
||||
threshold: number; // dBFS — gate opens above this, closes below it
|
||||
attackMs: number;
|
||||
holdMs: number;
|
||||
|
||||
Reference in New Issue
Block a user