mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-11-09 15:33:31 +00:00
fix: disable mic AGC by default to stop Windows audio crackle
Chromium's realtime AGC crackles on some Realtek/headset mics, heard as repeated breaking and pitch warble. The no-agc fix existed but was hidden behind an env var shipped builds never set. Make it the default; volume is still restored offline via the existing speechnorm/alimiter chain.
This commit is contained in:
1 parent
5aa731e987
commit
721d376f98
3 files changed
+8
-8
No files matched your search
@@ -21,7 +21,7 @@ import {
|
||||
import { parseJsonWithByteOrderMark } from "../utils";
|
||||
|
||||
const BROWSER_MICROPHONE_PROFILE_ENV = "RECORDLY_BROWSER_MIC_PROFILE";
|
||||
const DEFAULT_BROWSER_MICROPHONE_PROFILE = "processed";
|
||||
const DEFAULT_BROWSER_MICROPHONE_PROFILE = "no-agc";
|
||||
const recordingPreferencesStore = createRecordingPreferencesStore(RECORDINGS_SETTINGS_FILE);
|
||||
const BROWSER_MICROPHONE_PROFILES = new Set([
|
||||
"processed",
|
||||
|
||||
@@ -34,12 +34,12 @@ function createMockMediaRecorder(initialState: RecordingState = "inactive") {
|
||||
}
|
||||
|
||||
describe("createProcessedMicrophoneConstraints", () => {
|
||||
it("requests browser voice processing with AGC for the default microphone", () => {
|
||||
it("requests browser voice processing without AGC for the default microphone", () => {
|
||||
expect(createProcessedMicrophoneConstraints()).toEqual({
|
||||
audio: {
|
||||
echoCancellation: true,
|
||||
noiseSuppression: true,
|
||||
autoGainControl: true,
|
||||
autoGainControl: false,
|
||||
channelCount: { ideal: 1 },
|
||||
sampleRate: { ideal: 48000 },
|
||||
},
|
||||
@@ -53,7 +53,7 @@ describe("createProcessedMicrophoneConstraints", () => {
|
||||
deviceId: { exact: "device-123" },
|
||||
echoCancellation: true,
|
||||
noiseSuppression: true,
|
||||
autoGainControl: true,
|
||||
autoGainControl: false,
|
||||
channelCount: { ideal: 1 },
|
||||
sampleRate: { ideal: 48000 },
|
||||
},
|
||||
@@ -105,10 +105,10 @@ describe("createProcessedMicrophoneConstraints", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("normalizes invalid lab microphone profiles to production voice processing", () => {
|
||||
it("normalizes invalid lab microphone profiles to the default voice processing", () => {
|
||||
expect(normalizeBrowserMicrophoneProfile("RAW")).toBe("raw");
|
||||
expect(normalizeBrowserMicrophoneProfile("unknown")).toBe("processed");
|
||||
expect(normalizeBrowserMicrophoneProfile(null)).toBe("processed");
|
||||
expect(normalizeBrowserMicrophoneProfile("unknown")).toBe("no-agc");
|
||||
expect(normalizeBrowserMicrophoneProfile(null)).toBe("no-agc");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export type BrowserCaptureCursorPolicy = {
|
||||
hideOsCursorBeforeRecording: boolean;
|
||||
hideEditorOverlayCursorByDefault: boolean;
|
||||
};
|
||||
const DEFAULT_BROWSER_MICROPHONE_PROFILE: BrowserMicrophoneProfile = "processed";
|
||||
const DEFAULT_BROWSER_MICROPHONE_PROFILE: BrowserMicrophoneProfile = "no-agc";
|
||||
const BROWSER_MICROPHONE_PROFILES = new Set<BrowserMicrophoneProfile>([
|
||||
"processed",
|
||||
"no-agc",
|
||||
|
||||
Reference in new issue
Block a user