- P0:
decode(stream)→await recognizer.decodeAsync(stream), maketranscribeBufferasync - H1: Add
languageto cache key:{ modelId, language, recognizer } - H2: Strip regional suffix:
language.split("-")[0]before passing to Whisper/SenseVoice - P1:
pcmToFloat32use Int16Array typed view instead of readInt16LE loop - L7: Remove dead
LD_LIBRARY_PATH/DYLD_LIBRARY_PATHenv var setting (add comment explaining why) - H9+M20: Add early
process.arch === "arm"check and musl detection ininitSherpa()
- H8: Add
if (session.closed) return;after each await instopLocalSession - H7: Wrap
transcribeInProcessin timeout (120s) - M19: Pass AbortSignal through to
ensureModelDownloaded - P2: Remove
Buffer.from(chunk)→ pushchunkdirectly; clearaudioChunksafter concat - M2: Fix tier: whisper-medium → "standard", sensevoice-small → "edge", gigaam-v3 → "edge"
- H4: Check
resp.status === 200whenstartByte > 0→ switch to overwrite mode - M4+L1: Add backpressure (
drainevent) + removeBuffer.from(value)→ writevaluedirectly
- M10: Add
/dev/nvidia0pre-check before spawningnvidia-smi - L2: Add 32-bit cgroup sentinels + heuristic (
bytes > hostRamBytes → unlimited) - L4: Add Podman detection (
/run/.containerenv)
- M15: Guard
checkLocalServercalls withif (config.localEndpoint)in/voice test - M17: Add
clearRecognizerCache()insession_switchhandler - M18: Add
clearRecognizerCache()in/voice-languagehandler - H6: Fix Windows ffmpeg: enumerate dshow devices instead of
audio=default