Add keyword spotting API for node-addon-api (#877)
This commit is contained in:
@@ -625,6 +625,13 @@ SHERPA_ONNX_API const SherpaOnnxKeywordResult *GetKeywordResult(
|
||||
/// @param r A pointer returned by GetKeywordResult()
|
||||
SHERPA_ONNX_API void DestroyKeywordResult(const SherpaOnnxKeywordResult *r);
|
||||
|
||||
// the user has to call FreeKeywordResultJson() to free the returned pointer
|
||||
// to avoid memory leak
|
||||
SHERPA_ONNX_API const char *GetKeywordResultAsJson(
|
||||
SherpaOnnxKeywordSpotter *spotter, SherpaOnnxOnlineStream *stream);
|
||||
|
||||
SHERPA_ONNX_API void FreeKeywordResultJson(const char *s);
|
||||
|
||||
// ============================================================
|
||||
// For VAD
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user