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.
This commit is contained in:
Daniel Onyejesi 2026-03-25 18:41:05 -04:00
parent ad7a08e4c5
commit 0268d37151

View file

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