From e2ce8f5e3a51c0b9ee19f1be0271c81d80a0d7c9 Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Tue, 30 Jun 2026 00:49:11 -0400 Subject: [PATCH] lotus(#1): gate in-source denoise on dedicated lotusDenoiseSource flag The host already sets lotusDenoise=ml and injects its getUserMedia shim; reusing that flag would double-process audio the moment this fork ships. Gate the in-source engine on lotusDenoiseSource=1 instead, so the fork is inert on deploy and the host cuts over explicitly (set the flag + drop the shim) when ready. Co-Authored-By: Claude Opus 4.8 --- src/lotus/lotusDenoise.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lotus/lotusDenoise.ts b/src/lotus/lotusDenoise.ts index f48aeef7..e4702390 100644 --- a/src/lotus/lotusDenoise.ts +++ b/src/lotus/lotusDenoise.ts @@ -56,7 +56,13 @@ function safeAssetBase(raw: string | null): string { } export function startLotusDenoise(vm: CallViewModel): () => void { - if (lotusParam("lotusDenoise") !== "ml") return () => undefined; + // Gate on a DEDICATED flag — NOT the existing `lotusDenoise=ml` that the + // host's build-time getUserMedia shim already uses. Otherwise simply shipping + // this fork (while the host still injects its shim and still sets + // lotusDenoise=ml) would denoise twice. The host opts into the in-source + // engine with `lotusDenoiseSource=1` AND stops injecting the shim at the same + // time. Default off ⇒ the fork is inert and behaviour is unchanged. + if (!lotusFlag("lotusDenoiseSource")) return () => undefined; const requested = lotusParam("lotusModel"); const model: LotusDenoiseConfig["model"] =