feat: add VAD threshold controls and smooth gate ramp

Replace the hard 0/1 VAD gate with a 20ms ramp in the worklet to prevent
clicks on open/close transitions. Expose positive and negative speech
probability thresholds as user-adjustable settings (defaults 0.5/0.35).
Sliders with restore-defaults button added to the VAD section of the
audio settings tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mk
2026-03-23 23:57:35 -03:00
parent 1ffee2d25e
commit 859db651e0
5 changed files with 101 additions and 21 deletions

View File

@@ -146,6 +146,10 @@ export const noiseGateHold = new Setting<number>("noise-gate-hold", 200);
export const noiseGateRelease = new Setting<number>("noise-gate-release", 150);
export const vadEnabled = new Setting<boolean>("vad-enabled", false);
// Probability above which the VAD opens the gate (01)
export const vadPositiveThreshold = new Setting<number>("vad-positive-threshold", 0.5);
// Probability below which the VAD closes the gate (01)
export const vadNegativeThreshold = new Setting<number>("vad-negative-threshold", 0.35);
export const transientSuppressorEnabled = new Setting<boolean>(
"transient-suppressor-enabled",