From 8706e767affc6bdc8cb7a67ca3a20a62779ff048 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期三, 17 五月 2023 15:45:46 +0800
Subject: [PATCH] Merge branch 'main' of https://github.com/alibaba-damo-academy/FunASR into main

---
 funasr/runtime/onnxruntime/src/vad-model.cpp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/funasr/runtime/onnxruntime/src/vad-model.cpp b/funasr/runtime/onnxruntime/src/vad-model.cpp
index 0a0ec84..336758f 100644
--- a/funasr/runtime/onnxruntime/src/vad-model.cpp
+++ b/funasr/runtime/onnxruntime/src/vad-model.cpp
@@ -1,9 +1,14 @@
 #include "precomp.h"
 
-VadModel *CreateVadModel(std::map<std::string, std::string>& model_path, int thread_num)
+namespace funasr {
+VadModel *CreateVadModel(std::map<std::string, std::string>& model_path, int thread_num, int mode)
 {
     VadModel *mm;
-    mm = new FsmnVad();
+    if(mode == FSMN_VAD_OFFLINE){
+        mm = new FsmnVad();
+    }else{
+        LOG(ERROR)<<"Online fsmn vad not imp!";
+    }
 
     string vad_model_path;
     string vad_cmvn_path;
@@ -19,3 +24,5 @@
     mm->InitVad(vad_model_path, vad_cmvn_path, vad_config_path, thread_num);
     return mm;
 }
+
+} // namespace funasr
\ No newline at end of file

--
Gitblit v1.9.1