fix(denoise-tester): play models in both ears; match the call's DeepFilterNet strength #483

Merged
jared merged 1 commits from fix/denoise-tester-audio into lotus 2026-10-30 19:30:49 -04:00
Owner

Fixes two problems found while testing with "Record & compare".

RNNoise and Speex only played in the left ear

Chrome's Opus/WebM recordings often decode as stereo. The models only process channel 0, and the default channelCountMode: "max" ignores channelCount: 1. As a result the node outputs two channels with only the left one filled.

The fix adds a monoDownmix() node before the models, in both playback and the live monitor. The RNNoise, Speex and gate nodes are also pinned to explicit mono. Lotus Call already did this (#24), so real calls weren't affected.

Verified in Chromium with a stereo speech clip through RNNoise:

Left Right
before 16.1 0.0
after 16.0 15.9

DeepFilterNet sounded choppy at word ends

The tester ran DFN at attenuation limit 80, while calls used 60. Both mute the background outright, so words drop into dead silence. This now uses 25, matching LotusGuild/element-call#65; the measurements are in that PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes two problems found while testing with "Record & compare". ## RNNoise and Speex only played in the left ear Chrome's Opus/WebM recordings often decode as **stereo**. The models only process channel 0, and the default `channelCountMode: "max"` ignores `channelCount: 1`. As a result the node outputs two channels with only the left one filled. The fix adds a `monoDownmix()` node before the models, in both playback and the live monitor. The RNNoise, Speex and gate nodes are also pinned to explicit mono. Lotus Call already did this (#24), so real calls weren't affected. Verified in Chromium with a stereo speech clip through RNNoise: | | Left | Right | |---|---|---| | before | 16.1 | 0.0 | | after | 16.0 | 15.9 | ## DeepFilterNet sounded choppy at word ends The tester ran DFN at attenuation limit **80**, while calls used 60. Both mute the background outright, so words drop into dead silence. This now uses **25**, matching LotusGuild/element-call#65; the measurements are in that PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-30 18:53:32 -04:00
fix(denoise-tester): play models in both ears; match the call's DeepFilterNet strength
CI / Build & Quality Checks (push) Skipped
CI / Secret scan (gitleaks) (push) Skipped
CI / Playwright smoke (e2e) (push) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 21s
CI / Build & Quality Checks (pull_request) Successful in 7m3s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Playwright smoke (e2e) (pull_request) Successful in 27m13s
2f5bcf2b91
- Recorded clips often decode as stereo (Chrome Opus/WebM). The models
  only process channel 0, and the default channel mode ignores
  channelCount, so RNNoise/Speex played the cleaned audio in the LEFT EAR
  ONLY. Downmix to mono before the models (as Lotus Call does, #24) and
  pin the RNNoise/Speex/gate nodes to explicit mono. Verified in Chromium
  with a stereo speech clip through RNNoise: before L 16.1 / R 0.0, after
  L 16.0 / R 15.9.
- DeepFilterNet ran at attenuation limit 80 here vs 60 in calls; both
  muted the background outright, which sounds like the mic cutting out
  at word ends. Use 25, matching element-call#65.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared scheduled this pull request to auto merge when all checks succeed 2026-10-30 18:53:37 -04:00
jared merged commit 61d2433721 into lotus 2026-10-30 19:30:49 -04:00
jared deleted branch fix/denoise-tester-audio 2026-10-30 19:30:49 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#483