mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-24 17:27:02 +00:00
🐛(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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user