Add non-streaming ASR support for HarmonyOS. (#1564)

This commit is contained in:
Fangjun Kuang
2024-11-26 16:38:35 +08:00
committed by GitHub
parent a4b79f077c
commit 298b6b6fda
50 changed files with 648 additions and 454 deletions

View File

@@ -6,15 +6,6 @@
#include <memory>
#if __ANDROID_API__ >= 9
#include "android/asset_manager.h"
#include "android/asset_manager_jni.h"
#endif
#if __OHOS__
#include "rawfile/raw_file_manager.h"
#endif
#include "sherpa-onnx/csrc/vad-model.h"
namespace sherpa_onnx {
@@ -23,13 +14,8 @@ class SileroVadModel : public VadModel {
public:
explicit SileroVadModel(const VadModelConfig &config);
#if __ANDROID_API__ >= 9
SileroVadModel(AAssetManager *mgr, const VadModelConfig &config);
#endif
#if __OHOS__
SileroVadModel(NativeResourceManager *mgr, const VadModelConfig &config);
#endif
template <typename Manager>
SileroVadModel(Manager *mgr, const VadModelConfig &config);
~SileroVadModel() override;