From 207ba11da12f09e8bd84f057c585f4bb93a85f53 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 19 Mar 2021 17:08:01 -0600 Subject: [PATCH] Tweak a bunch of settings --- src/voice/VoiceRecorder.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/voice/VoiceRecorder.ts b/src/voice/VoiceRecorder.ts index 66eb64b424..3d1008d45e 100644 --- a/src/voice/VoiceRecorder.ts +++ b/src/voice/VoiceRecorder.ts @@ -26,10 +26,15 @@ export class VoiceRecorder { mediaTrackConstraints: { deviceId: CallMediaHandler.getAudioInput(), }, - encoderSampleRate: 16000, // we could go down to 12khz, but we lose quality + encoderSampleRate: 48000, // we could go down to 12khz, but we lose quality. 48khz is a webrtc default encoderApplication: 2048, // voice (default is "audio") streamPages: true, // so we can have a live EQ for the user - encoderFrameSize: 10, // we want updates fairly regularly for the UI + encoderFrameSize: 20, // ms, we want updates fairly regularly for the UI + numberOfChannels: 1, // stereo isn't important for us + //sourceNode: instanceof MediaStreamAudioSourceNode, // TODO: @@ Travis: Use this for EQ stuff. + encoderBitRate: 64000, // 64kbps is average for webrtc + encoderComplexity: 3, // 0-10, 0 is fast and low complexity + resampleQuality: 3, // 0-10, 10 is slow and high quality }); private buffer = new Uint8Array(0); private mxc: string;