Add streaming ASR support for HarmonyOS. (#1565)

This commit is contained in:
Fangjun Kuang
2024-11-26 18:36:56 +08:00
committed by GitHub
parent 298b6b6fda
commit 2101227269
35 changed files with 367 additions and 206 deletions

View File

@@ -1527,6 +1527,13 @@ SHERPA_ONNX_API void SherpaOnnxOfflineSpeakerDiarizationDestroyResult(
// It is for HarmonyOS
typedef struct NativeResourceManager NativeResourceManager;
/// @param config Config for the recognizer.
/// @return Return a pointer to the recognizer. The user has to invoke
// SherpaOnnxDestroyOnlineRecognizer() to free it to avoid memory leak.
SHERPA_ONNX_API const SherpaOnnxOnlineRecognizer *
SherpaOnnxCreateOnlineRecognizerOHOS(
const SherpaOnnxOnlineRecognizerConfig *config, NativeResourceManager *mgr);
/// @param config Config for the recognizer.
/// @return Return a pointer to the recognizer. The user has to invoke
// SherpaOnnxDestroyOfflineRecognizer() to free it to avoid memory