🐛(frontend) fix noise reduction left-channel-only audio

Fix bug with RNNoise noise reduction which interprets mono input
as left channel with some browsers.
This commit is contained in:
leo
2026-06-10 17:59:09 +02:00
committed by aleb_the_flash
parent 69a6dd1463
commit 61f7ad05e9
2 changed files with 14 additions and 1 deletions
+4
View File
@@ -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
@@ -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()