Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(meeting): lower silence gate and add peak fallback

Gabriel Stein2e21542dba43
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index 12586971a..6dc60375b 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -3191,15 +3191,24 @@ class IPCHandlers {
const pcm16k = downsample24kTo16k(pcm24k);
- // Skip silent/near-silent chunks to prevent Whisper hallucinations
const samples = new Int16Array(pcm16k.buffer, pcm16k.byteOffset, pcm16k.length / 2);
let sumSq = 0;
+ let peak = 0;
for (let i = 0; i < samples.length; i++) {
const n = samples[i] / 0x7fff;
sumSq += n * n;
+ const abs = n < 0 ? -n : n;
+ if (abs > peak) peak = abs;
}
const rms = Math.sqrt(sumSq / samples.length);
- if (rms < 0.005) return;
+ if (rms < 0.0015 && peak < 0.05) {
+ debugLogger.debug("Skipping silent meeting chunk", {
+ source,
+ rms: rms.toFixed(4),
+ peak: peak.toFixed(4),
+ });
+ return;
+ }
const wav = pcm16ToWav(pcm16k);