From 07f7b03515e702a52a7b1377f6d11efbf40a7ce6 Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Fri, 27 Feb 2026 22:38:27 +0100
Subject: [PATCH] AudioCapture: lower RMS threshold to 0.0003, increase chunk
to 4s for less fragmentation
Made-with: Cursor
---
src/bot/audioCaptureProcedure.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bot/audioCaptureProcedure.ts b/src/bot/audioCaptureProcedure.ts
index 6ebb365..008be26 100644
--- a/src/bot/audioCaptureProcedure.ts
+++ b/src/bot/audioCaptureProcedure.ts
@@ -123,8 +123,8 @@ export class AudioCaptureProcedure {
let skippedSilentChunks = 0;
let callbackCount = 0;
let totalNonZeroSamples = 0;
- const minRmsThreshold = 0.0015;
- const samplesPerChunk = nativeRate * 2;
+ const minRmsThreshold = 0.0003;
+ const samplesPerChunk = nativeRate * 4;
const targetRate = 16000;
// Pre-roll: keep last 500ms of discarded silent chunks so that
// speech onsets at the tail of a silent window are preserved.