From fefe260f0a026502e195be439f799fd8dbdd8c08 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 4 Apr 2026 19:16:07 +0700 Subject: [PATCH] Fix Silero VAD crash: disable external buffers in CircularBuffer.get() Newer sherpa-onnx-node rejects external buffers by default, causing "External buffers are not allowed" on every voice audio chunk. --- .../server/speech/providers/local/sherpa/silero-vad-session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/server/speech/providers/local/sherpa/silero-vad-session.ts b/packages/server/src/server/speech/providers/local/sherpa/silero-vad-session.ts index 6e95cfbfe..e2fd52df8 100644 --- a/packages/server/src/server/speech/providers/local/sherpa/silero-vad-session.ts +++ b/packages/server/src/server/speech/providers/local/sherpa/silero-vad-session.ts @@ -107,7 +107,7 @@ export class SherpaSileroVadSession extends EventEmitter implements TurnDetectio const samples = pcm16leToFloat32(pcm16le, 1); this.inputBuffer.push(samples); while (this.inputBuffer.size() > this.windowSize) { - const window = this.inputBuffer.get(this.inputBuffer.head(), this.windowSize); + const window = this.inputBuffer.get(this.inputBuffer.head(), this.windowSize, false); this.inputBuffer.pop(this.windowSize); this.vad.acceptWaveform(window); this.syncDetectionState();