npm / sherpa-onnx-node
sherpa-onnx-node
What changed in sherpa-onnx-node 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-04.
1 breaking1 security8 new APIs and options1 behavior and defaults15 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsherpa-onnx-node 226 changes
Breaking changes 1
Raises ValueError when it cannot encode keywords.
Security 1
Fixed a heap overflow for short text when speed is greater than 1.
New APIs and options 8
FunASR-Nano prompt options can now be set per stream.
Added GetEmbedding to SpeakerEmbeddingManager.
Offline CTC models now support HLG decoding through the C, CXX, JNI/Kotlin/Java, and WASM APIs.
Added this option to online-websocket-server.
Streaming NeMo transducer models now support hotwords with modified_beam_search.
Added OfflineDiacritization to the Kotlin API.
A Node.js addon is now available for Windows arm64.
The Flutter package now ships arm64 libraries.
Behavior and default changes 1
Provider configuration keys are now forwarded to the CUDA execution provider.
Fixes and other changes 15
SherpaOnnxCreate* functions catch C++ exceptions and return NULL.
lang2id is derived from the model vocabulary, and the system warns instead of silently falling back to English.
Fixed strings returned to Java for characters outside the BMP.
C++ exceptions are converted to Java exceptions in these constructors.
Fixed word boundaries, out-of-vocabulary words, and Unicode handling.
Fixed decoding by feeding encoder_attention_mask at raw audio length.
NeMo mel features now use NeMo's additive log-zero guard.
Fixed timestamps after filtering special tokens.
Fixed an abort when input contains fewer than 400 samples.
Fixed JSON escaping in online and offline recognition results.
Python methods now check embedding dimensions before releasing the GIL.
Python methods check the embedding size.
The language-agnostic na tag is now accepted.
VAD sample positions were widened to int64_t to fix SIGSEGV on long streams.
Fixed character loss for byte-level BPE tokens.