AudioCapture: lower RMS threshold to 0.0003, increase chunk to 4s for less fragmentation

Made-with: Cursor
This commit is contained in:
ValueOn AG 2026-02-27 22:38:27 +01:00
parent cd22b1da9f
commit 07f7b03515

View file

@ -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.