From 8dab6d184a034ca86eafa644ea0d2100aadfe27d Mon Sep 17 00:00:00 2001
From: jmwang66 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期二, 09 五月 2023 10:58:33 +0800
Subject: [PATCH] Merge pull request #473 from alibaba-damo-academy/dev_smohan
---
funasr/runtime/onnxruntime/include/model.h | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/funasr/runtime/onnxruntime/include/model.h b/funasr/runtime/onnxruntime/include/model.h
index 16ea34f..44bd022 100644
--- a/funasr/runtime/onnxruntime/include/model.h
+++ b/funasr/runtime/onnxruntime/include/model.h
@@ -3,17 +3,18 @@
#define MODEL_H
#include <string>
-
+#include <map>
+namespace funasr {
class Model {
public:
virtual ~Model(){};
- virtual void reset() = 0;
- virtual std::string forward_chunk(float *din, int len, int flag) = 0;
- virtual std::string forward(float *din, int len, int flag) = 0;
- virtual std::string rescoring() = 0;
- virtual std::vector<std::vector<int>> vad_seg(std::vector<float>& pcm_data)=0;
- virtual std::string AddPunc(const char* szInput)=0;
+ virtual void Reset() = 0;
+ virtual void InitAsr(const std::string &am_model, const std::string &am_cmvn, const std::string &am_config, int thread_num)=0;
+ virtual std::string ForwardChunk(float *din, int len, int flag) = 0;
+ virtual std::string Forward(float *din, int len, int flag) = 0;
+ virtual std::string Rescoring() = 0;
};
-Model *CreateModel(const char *path,int nThread=0,bool quantize=false, bool use_vad=false, bool use_punc=false);
+Model *CreateModel(std::map<std::string, std::string>& model_path,int thread_num=1);
+} // namespace funasr
#endif
--
Gitblit v1.9.1