From 85e351bdd9422cb9612fd2d2e0a37e358c26cbc1 Mon Sep 17 00:00:00 2001
From: boji123 <boji123@aliyun.com>
Date: 星期五, 18 八月 2023 15:35:49 +0800
Subject: [PATCH] 增加模型下载流程 & 接口修正 & debug (#871)
---
funasr/runtime/onnxruntime/src/vad-model.cpp | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/vad-model.cpp b/funasr/runtime/onnxruntime/src/vad-model.cpp
index 336758f..c164c3e 100644
--- a/funasr/runtime/onnxruntime/src/vad-model.cpp
+++ b/funasr/runtime/onnxruntime/src/vad-model.cpp
@@ -1,14 +1,10 @@
#include "precomp.h"
namespace funasr {
-VadModel *CreateVadModel(std::map<std::string, std::string>& model_path, int thread_num, int mode)
+VadModel *CreateVadModel(std::map<std::string, std::string>& model_path, int thread_num)
{
VadModel *mm;
- if(mode == FSMN_VAD_OFFLINE){
- mm = new FsmnVad();
- }else{
- LOG(ERROR)<<"Online fsmn vad not imp!";
- }
+ mm = new FsmnVad();
string vad_model_path;
string vad_cmvn_path;
@@ -25,4 +21,11 @@
return mm;
}
+VadModel *CreateVadModel(void* fsmnvad_handle)
+{
+ VadModel *mm;
+ mm = new FsmnVadOnline((FsmnVad*)fsmnvad_handle);
+ return mm;
+}
+
} // namespace funasr
\ No newline at end of file
--
Gitblit v1.9.1