Model load failure silently publishes raw audio while the host UI says denoise is on #8

Closed
opened 2026-09-12 02:13:00 -04:00 by jared · 0 comments
Owner

Severity: medium · Type: bug · Confidence: high

Location: src/lotus/lotusDenoise.ts:102-106

Problem

apply() is the only error boundary: mic.setProcessor(...).catch((e) => logger.warn(...)). Every failure mode — missing denoise/*.wasm (the assets are copied by cinny's vite plugin, not bundled by this repo, see the ⚠️ CONTRACT note at lotusDenoiseProcessor.ts:38-43), a browser that won't give a 16 kHz context for DTLN (lotusDenoiseProcessor.ts:220), a DFN ESM that moved — ends as a console warning. The user keeps publishing unprocessed audio, cinny's denoise toggle still reads "on", and there is no fallback to a simpler model. There is also no fromWidget message back to the host to report the failure, unlike every other lotus feature which has a host channel.

How to trigger

Delete/rename anything under public/element-call/denoise/, or pick DTLN on a browser that clamps AudioContext sample rates, and join a call.

Suggested fix

On init failure, retry once with model: "rnnoise" (the smallest, most portable tier) and, if that also fails, send a fromWidget failure notice so cinny can reflect the real state in its denoise toggle.


Filed from the September 2026 audit (branch lotus).

**Severity:** medium · **Type:** bug · **Confidence:** high **Location:** `src/lotus/lotusDenoise.ts:102-106` ### Problem `apply()` is the only error boundary: `mic.setProcessor(...).catch((e) => logger.warn(...))`. Every failure mode — missing `denoise/*.wasm` (the assets are copied by cinny's vite plugin, not bundled by this repo, see the `⚠️ CONTRACT` note at `lotusDenoiseProcessor.ts:38-43`), a browser that won't give a 16 kHz context for DTLN (`lotusDenoiseProcessor.ts:220`), a DFN ESM that moved — ends as a console warning. The user keeps publishing unprocessed audio, cinny's denoise toggle still reads "on", and there is no fallback to a simpler model. There is also no `fromWidget` message back to the host to report the failure, unlike every other lotus feature which has a host channel. ### How to trigger Delete/rename anything under `public/element-call/denoise/`, or pick DTLN on a browser that clamps `AudioContext` sample rates, and join a call. ### Suggested fix On `init` failure, retry once with `model: "rnnoise"` (the smallest, most portable tier) and, if that also fails, send a `fromWidget` failure notice so cinny can reflect the real state in its denoise toggle. --- _Filed from the September 2026 audit (branch `lotus`)._
jared added this to the EC fork audit 2026-09 · Medium & Low milestone 2026-09-12 02:13:00 -04:00
jared added the bugpriority: mediumarea: denoise labels 2026-09-12 02:13:00 -04:00
jared self-assigned this 2026-09-12 02:13:00 -04:00
jared closed this issue 2026-09-13 01:22:43 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
2026-11-14
Dependencies

No dependencies set.

Reference: LotusGuild/element-call#8