fix(calls): harden ML denoise shim against static; fix lint/format
CI / Build & Quality Checks (push) Successful in 10m26s
Trigger Desktop Build / trigger (push) Successful in 17s

ML noise suppression produced loud static on real calls. RNNoise requires
mono 48kHz float input; feeding it stereo or wrong-rate data is the classic
cause of that static. Harden the shim:
- request mono (channelCount:1) + 48kHz capture
- run a 48kHz AudioContext and BAIL to the raw mic if the browser won't
  give a true 48kHz context (wrong-rate data -> static)
- force the worklet node to explicit mono in/out
- use the non-SIMD rnnoise.wasm (SIMD build artifacts on some GPUs)
- share one AudioContext across captures

Also fix the two CI-blocking eslint errors (unused vars in UrlPreviewCard
and useLocalMessageSearch) and apply repo-wide prettier formatting so
check:eslint and check:prettier pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:50:00 -04:00
parent 5deed79b42
commit 4a401cf816
13 changed files with 388 additions and 357 deletions
+7 -9
View File
@@ -21,8 +21,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
const root = join(__dirname, '..');
const catalogPath = join(root, 'src', 'app', 'features', 'lotus', 'avatarDecorations.ts');
const CDN =
'https://drive.lotusguild.org/public.php/dav/files/bHswJ9pNKp2t26N/cinny-decorations';
const CDN = 'https://drive.lotusguild.org/public.php/dav/files/bHswJ9pNKp2t26N/cinny-decorations';
// Extract all slugs from the catalog file
const catalog = readFileSync(catalogPath, 'utf8');
@@ -63,16 +62,13 @@ if (missing.length === 0) {
}
console.log(`Found: ${found.length} Missing: ${missing.length}\n`);
missing.forEach((r) =>
console.log(` Removing (HTTP ${r.status}): ${r.slug}`),
);
missing.forEach((r) => console.log(` Removing (HTTP ${r.status}): ${r.slug}`));
const missingSet = new Set(missing.map((r) => r.slug));
// Remove individual entries for missing slugs
let updated = catalog.replace(
/^[ \t]*\{ slug: '([^']+)', name: .+\},?\r?\n/gm,
(match, slug) => (missingSet.has(slug) ? '' : match),
let updated = catalog.replace(/^[ \t]*\{ slug: '([^']+)', name: .+\},?\r?\n/gm, (match, slug) =>
missingSet.has(slug) ? '' : match,
);
// Drop category blocks that now have an empty decorations array
@@ -85,5 +81,7 @@ updated = updated.replace(
updated = updated.replace(/\n{3,}/g, '\n\n');
writeFileSync(catalogPath, updated, 'utf8');
console.log(`\nDone. Removed ${missing.length} entr${missing.length === 1 ? 'y' : 'ies'} from the catalog.`);
console.log(
`\nDone. Removed ${missing.length} entr${missing.length === 1 ? 'y' : 'ies'} from the catalog.`,
);
console.log('Review with: git diff src/app/features/lotus/avatarDecorations.ts');