From ae49b2a8e1bc676e6014d8a12ebeec947b655e3e Mon Sep 17 00:00:00 2001
From: 莫拉古 <61447879+yechaoying@users.noreply.github.com>
Date: 星期五, 29 十一月 2024 09:55:43 +0800
Subject: [PATCH] 变量名写错了 (#2249)
---
runtime/onnxruntime/src/offline-stream.cpp | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/runtime/onnxruntime/src/offline-stream.cpp b/runtime/onnxruntime/src/offline-stream.cpp
index 166d3c9..b436025 100644
--- a/runtime/onnxruntime/src/offline-stream.cpp
+++ b/runtime/onnxruntime/src/offline-stream.cpp
@@ -47,7 +47,13 @@
use_gpu = false;
#endif
}else{
- asr_handle = make_unique<Paraformer>();
+ if (model_path.at(MODEL_DIR).find(MODEL_SVS) != std::string::npos)
+ {
+ asr_handle = make_unique<SenseVoiceSmall>();
+ model_type = MODEL_SVS;
+ }else{
+ asr_handle = make_unique<Paraformer>();
+ }
}
bool enable_hotword = false;
@@ -138,6 +144,10 @@
}
}
#endif
+ if(model_type == MODEL_SVS){
+ use_itn = false;
+ use_punc = false;
+ }
}
OfflineStream *CreateOfflineStream(std::map<std::string, std::string>& model_path, int thread_num, bool use_gpu, int batch_size)
--
Gitblit v1.9.1