fix(denoise): ship the DeepFilterNet 3 worklet as a file so it starts in the desktop app #477
Merged
jared
merged 1 commits from 2026-10-28 20:42:25 -04:00
fix/dfn-worklet-file into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#477
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by Jared: DeepFilterNet 3 noise suppression "didn't start" in a call in the desktop app.
Console:
Cause:
deepfilternet3-noise-filterinlines its AudioWorklet as a string and loads it from ablob:URL. Audio worklets fall underscript-src, notworker-src, and the desktop CSP (tauri.conf.json) has noblob:inscript-src.script-src.Fix (no CSP change): the
lotusDenoisebuild step now writes the inline worklet todenoise/deepfilternet/dfn-worklet.js, and patches the copiedindex.esm.jsto calladdModule(new URL('./dfn-worklet.js', import.meta.url)). That's allowed byscript-src 'self'. The build fails if the library changes shape, rather than shipping a model that can't start.Verified in Chromium with the built assets, under the exact desktop CSP:
Side finding while measuring (not a production problem): Vite's local preview server sends
.tar.gzfiles withContent-Encoding: gzip. The browser then un-gzips the model,df_createpanics inside the worklet (RuntimeError: unreachable), and DeepFilterNet silently passes audio through (0 dB).application/octet-stream(checked), and the desktop's localhost plugin sets noContent-Encoding(checked intauri-plugin-localhost2.3.2).🤖 Generated with Claude Code
https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5