From 61f7ad05e918cb50f962d03c955e53afc0ed0ad0 Mon Sep 17 00:00:00 2001 From: leo <260626284+cameledev@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:59:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20fix=20noise=20reductio?= =?UTF-8?q?n=20left-channel-only=20audio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix bug with RNNoise noise reduction which interprets mono input as left channel with some browsers. --- CHANGELOG.md | 4 ++++ .../rooms/livekit/processors/RnnNoiseProcessor.ts | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87491848..4cd090d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to - ♻️(addon) improve Outlook add-on: i18n support, feedback link, smarter link +### Fixed + +- 🐛(frontend) fix noise reduction left-channel-only audio + ## [1.19.0] - 2026-06-04 ### Added diff --git a/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts b/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts index 69a71009..d8324bdb 100644 --- a/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts +++ b/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts @@ -43,7 +43,16 @@ export class RnnNoiseProcessor implements AudioProcessorInterface { this.noiseSuppressionNode = new AudioWorkletNode( audioContext, - NoiseSuppressorWorklet_Name + NoiseSuppressorWorklet_Name, + { + // RNNoise is a mono algorithm. Its worklet only denoises and writes + // channel 0. Force any (possibly stereo) input to down-mix to a single + // channel and emit a single channel, so we don't produce a stereo frame + // whose right channel is left silent. + channelCount: 1, + channelCountMode: 'explicit', + outputChannelCount: [1], + } ) this.destinationNode = audioContext.createMediaStreamDestination()