Support onnxruntime 1.16.0 (#330)
This commit is contained in:
@@ -31,9 +31,18 @@ extern "C" {
|
||||
#define SHERPA_ONNX_IMPORT
|
||||
#endif
|
||||
#else // WIN32
|
||||
#define SHERPA_ONNX_EXPORT __attribute__((visibility("default")))
|
||||
#if __APPLE__
|
||||
// it throws a warning on macOS when using
|
||||
// __attribute__((visibility("default")))
|
||||
//
|
||||
// warning: 'visibility' attribute ignored [-Wignored-attributes]
|
||||
#define SHERPA_ONNX_EXPORT
|
||||
#else
|
||||
#define SHERPA_ONNX_EXPORT __attribute__((visibility("default")))
|
||||
#endif // __APPLE__
|
||||
|
||||
#define SHERPA_ONNX_IMPORT SHERPA_ONNX_EXPORT
|
||||
#endif
|
||||
#endif // WIN32
|
||||
|
||||
#if defined(SHERPA_ONNX_BUILD_MAIN_LIB)
|
||||
#define SHERPA_ONNX_API SHERPA_ONNX_EXPORT
|
||||
@@ -178,12 +187,14 @@ SHERPA_ONNX_API void DestroyOnlineRecognizer(
|
||||
SHERPA_ONNX_API SherpaOnnxOnlineStream *CreateOnlineStream(
|
||||
const SherpaOnnxOnlineRecognizer *recognizer);
|
||||
|
||||
/// Create an online stream for accepting wave samples with the specified hot words.
|
||||
/// Create an online stream for accepting wave samples with the specified hot
|
||||
/// words.
|
||||
///
|
||||
/// @param recognizer A pointer returned by CreateOnlineRecognizer()
|
||||
/// @return Return a pointer to an OnlineStream. The user has to invoke
|
||||
/// DestroyOnlineStream() to free it to avoid memory leak.
|
||||
SHERPA_ONNX_API SherpaOnnxOnlineStream *CreateOnlineStreamWithHotwords(const SherpaOnnxOnlineRecognizer *recognizer, const char *hotwords);
|
||||
SHERPA_ONNX_API SherpaOnnxOnlineStream *CreateOnlineStreamWithHotwords(
|
||||
const SherpaOnnxOnlineRecognizer *recognizer, const char *hotwords);
|
||||
|
||||
/// Destroy an online stream.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user