lotus(#1): gate in-source denoise on dedicated lotusDenoiseSource flag
CI / Build embedded bundle (push) Successful in 46s
CI / Publish to Gitea npm registry (push) Has been skipped

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 <noreply@anthropic.com>
This commit is contained in:
Lotus CI
2026-06-30 00:49:11 -04:00
co-authored by Claude Opus 4.8
parent e903f98bbe
commit e2ce8f5e3a
+7 -1
View File
@@ -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"] =