# Element Call RNNoise (vendored for testing) Copied unchanged from element-hq/element-call pull request #3772, which is **open and not merged**. - Source: https://github.com/LucaPisl/element-call, branch `lucapisl/rnnoise-noise-suppression` - Commit: `1b7877a385d4102f130ff06e3a87a4c082585389`, copied 2026-11-11 - Licence: `AGPL-3.0-only OR LicenseRef-Element-Commercial` (file headers). AGPL text in `LICENSE`. `THIRD_PARTY_NOTICES` covers RNNoise (BSD) and `@jitsi/rnnoise-wasm` (Apache-2.0). AGPL duties we accept (user decision, session 3): anyone who receives a script built from this code (the injected vdo.ninja script) must be able to get its full source under AGPL-3.0, linked from the app. Keep the derived script a separate file so the rest of the app is not combined with it. Since P2 the worklet runs in the studio's own page, not in vdo.ninja's. Whether this decision covers that is open (`spikes/agpl-check.md`). Files: - `src/audio/RNNoiseWorkletModule.ts`: the AudioWorkletProcessor. Ring buffer (128 to 480 samples), mono downmix, VAD-driven gain envelope with presets, passthrough until the wasm is ready. - `src/audio/RNNoiseProcessor.ts`: LiveKit TrackProcessor wrapper. The audio graph in `init()` is plain Web Audio: source → worklet (`channelCount: 1`, explicit) → MediaStreamDestination. It requires a 48 kHz AudioContext. - `src/audio/noiseSuppressionPolicy.ts`: turns native noiseSuppression off only when RNNoise is on and supported. - Tests (`*.test.ts`) are vitest and are not run by this repo's `npm test`. The app uses only an adapted copy of `RNNoiseWorkletModule.ts` (`src/rnnoise/`, built into `public/rnnoise/rnnoise-worklet.js`) and the type-only `rnnoiseTypes.ts`. The rest is not compiled.