sherpa-onnx/c-api/mainpage.md
This documentation covers the public native APIs shipped in:
c-api.h — the C APIcxx-api.h — the C++ wrapper built on top of the C APIThese 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:
doxygen Doxyfile
HTML output is written to:
doxygen-docs/html/