Registry / ai-ml / sherpa-onnx-core

sherpa-onnx-core

JSON →
library1.13.3pypypi✓ verified 84d ago

Core shared libraries for sherpa-onnx, a cross-platform speech recognition and text-to-speech toolkit. Version 1.12.40 provides the underlying ONNX Runtime-based engines for ASR, VAD, and TTS, with package updates for various platforms. Release cadence is approximately semi-monthly.

pip install sherpa-onnx-core
INSTALL
IMPORT
SIG · SHERPA-ONNX-CORE
S
sherpa-onnx-core
ai-mlpythonv1.13.3
Install
1.8s avg
Import
Disk
45MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.13.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 47MB
45MB installed
● package 45MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OfflineRecognizer
import sherpa_onnx
from sherpa_onnx import OfflineRecognizer
The recommended import is the module-level import; 'from sherpa_onnx import OfflineRecognizer' works but is less conventional.
OnlineRecognizer
import sherpa_onnx
from sherpa_onnx_core import OnlineRecognizer
sherpa-onnx-core does not expose a separate package; everything is under sherpa_onnx.

Basic offline ASR using pre-downloaded ONNX models.

import sherpa_onnx recognizer = sherpa_onnx.OfflineRecognizer.from_models( encoder="path/to/encoder.onnx", decoder="path/to/decoder.onnx", tokens="path/to/tokens.txt", ) wave = sherpa_onnx.read_wave("test.wav") result = recognizer.decode(wave) print(result.text)
Debug
Known issues
gotchaThe 'sherpa-onnx-core' package only contains shared libraries; the Python API is provided by 'sherpa-onnx'. Installing 'sherpa-onnx-core' alone will not give you importable Python modules.
fix
Install 'sherpa-onnx' instead: pip install sherpa-onnx
affects: all
breakingModel file formats may change between major releases. Models downloaded for version 1.9 may not work with 1.12.
fix
Always download the latest model files for your sherpa-onnx version.
affects: >=1.10
deprecatedThe 'sherpa_onnx.OfflineRecognizer' constructor signature changed in v1.10; 'from_models' is now the preferred factory method.
fix
Use 'OfflineRecognizer.from_models(...)' instead of 'OfflineRecognizer(...)'.
affects: >=1.10
Errors
Common errors & fixes
ImportError: cannot import name 'OfflineRecognizer' from 'sherpa_onnx'
The 'sherpa-onnx-core' package does not include the Python bindings; only the C libraries.
fix
Install 'sherpa-onnx' (pip install sherpa-onnx) which provides the Python API.
ModuleNotFoundError: No module named 'sherpa_onnx'
Neither 'sherpa-onnx' nor 'sherpa-onnx-core' is installed.
fix
Run 'pip install sherpa-onnx'.
RuntimeError: Model file not found: /path/to/encoder.onnx
The model path is incorrect or the model was not downloaded.
fix
Download the model files from the official model zoo and provide absolute paths.
Upgrade
Version history
1.13.3latest on PyPI · released Jun 15, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
sherpa-onnx-core — pip install sherpa-onnx-core · libregistry