|
sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
|
This documentation covers the public native APIs shipped in:
These headers expose the main sherpa-onnx inference features for native applications and for language bindings that need a stable ABI.
The generated docs include the public APIs for:
The C API also includes HarmonyOS-specific constructor variants where applicable.
Use c-api.h if you are:
Use cxx-api.h if you are:
std::string, std::vector, and move-only wrapper classesFor the C API:
SherpaOnnxCreate*() are usually destroyed with a matching SherpaOnnxDestroy*()For the C++ API:
For both APIs, the usual flow is:
Start with:
Representative example programs live in:
Useful examples include:
decode-file-c-api.cwhisper-c-api.ccohere-transcribe-c-api.csense-voice-c-api.cnemo-parakeet-c-api.cstreaming-zipformer-with-hr-cxx-api.ccsense-voice-cxx-api.ccpocket-tts-en-cxx-api.ccvad-cxx-api.ccFrom sherpa-onnx/c-api/, run:
HTML output is written to: