fix(denoise): stop DeepFilterNet silently passing raw audio through #64

Merged
jared merged 2 commits from fix/dfn-model-bytes into lotus 2026-10-30 15:16:25 -04:00
2 Commits
Author SHA1 Message Date
Lotus CIandClaude Opus 5.5 283b231c7a style: oxfmt
CI / Build embedded bundle (push) Skipped
CI / Build embedded bundle (pull_request) Successful in 5m2s
CI / Publish to Gitea npm registry (pull_request) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
2026-10-30 15:11:19 -04:00
Lotus CIandClaude Opus 5.5 16f5f3d1a3 fix(denoise): stop DeepFilterNet silently passing raw audio through
CI / Build embedded bundle (push) Skipped
CI / Build embedded bundle (pull_request) Failing after 5m38s
CI / Publish to Gitea npm registry (pull_request) Skipped
If the DeepFilterNet model is served with `Content-Encoding: gzip` (vite
preview does this for .tar.gz; some CDNs and nginx gzip_static setups do
too), fetch() hands back the already-unpacked tar. The library's worklet
then fails inside df_create, swallows the error and passes the raw mic
through, while Lotus Call reports DeepFilterNet as active.

Check the bytes after initialize(): a gzip model is used as-is, an
unpacked tar is re-gzipped in the browser, and anything else throws so
the rnnoise fallback runs and the host is told the truth.

Measured in a two-browser call (fan noise, SNR 15 dB): before, 4.9 dB of
noise removed, i.e. none beyond gain differences; after, 30.9 dB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
2026-10-30 14:18:01 -04:00