Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
VoiceRecordings: honor advanced audio processing settings
Browse files Browse the repository at this point in the history
Audio processing settings introduced in #8759 is now taken into account
when recording a voice message.

Signed-off-by: László Várady <[email protected]>
  • Loading branch information
MrAnno committed Nov 22, 2022
1 parent 40cbee6 commit 3b66574
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/audio/VoiceRecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ export class VoiceRecording extends EventEmitter implements IDestroyable {
this.recorderStream = await navigator.mediaDevices.getUserMedia({
audio: {
channelCount: CHANNELS,
noiseSuppression: true, // browsers ignore constraints they can't honour
deviceId: MediaDeviceHandler.getAudioInput(),
autoGainControl: { ideal: MediaDeviceHandler.getAudioAutoGainControl() },
echoCancellation: { ideal: MediaDeviceHandler.getAudioEchoCancellation() },
noiseSuppression: { ideal: MediaDeviceHandler.getAudioNoiseSuppression() },
},
});
this.recorderContext = createAudioContext({
Expand Down

0 comments on commit 3b66574

Please sign in to comment.