From 0268d37151eabe0b10c34d8768ca767ea46e5c0e Mon Sep 17 00:00:00 2001 From: Daniel Onyejesi Date: Wed, 25 Mar 2026 18:41:05 -0400 Subject: [PATCH] Fix AWS Transcribe: reduce chunk size from 32KB to 8KB AWS Transcribe rejects audio event frames over ~16KB with a cryptic "Deserialization error" / "Your stream is too big" message hidden inside the SDK error object. Reducing to 8KB per chunk fixes both Standard and Medical Transcribe streaming. --- src/utils/transcribeAWS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/transcribeAWS.js b/src/utils/transcribeAWS.js index 8ce550e..66f27bd 100644 --- a/src/utils/transcribeAWS.js +++ b/src/utils/transcribeAWS.js @@ -19,7 +19,7 @@ const { spawn } = require('child_process'); -const CHUNK_SIZE = 32768; // 32 KB per audio chunk +const CHUNK_SIZE = 8192; // 8 KB per audio chunk (AWS limit ~32KB per event frame) // Convert any browser audio (WebM, OGG, etc.) to raw PCM s16le 16kHz mono // using ffmpeg. Returns a Buffer of raw PCM bytes.