Add C++ API for streaming zipformer ASR on RK NPU (#1908)
This commit is contained in:
@@ -7,6 +7,16 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
@@ -23,6 +33,17 @@ bool FileExists(const std::string &filename);
|
||||
*/
|
||||
void AssertFileExists(const std::string &filename);
|
||||
|
||||
std::vector<char> ReadFile(const std::string &filename);
|
||||
|
||||
#if __ANDROID_API__ >= 9
|
||||
std::vector<char> ReadFile(AAssetManager *mgr, const std::string &filename);
|
||||
#endif
|
||||
|
||||
#if __OHOS__
|
||||
std::vector<char> ReadFile(NativeResourceManager *mgr,
|
||||
const std::string &filename);
|
||||
#endif
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
#endif // SHERPA_ONNX_CSRC_FILE_UTILS_H_
|
||||
|
||||
Reference in New Issue
Block a user