From 7c11a0d6a84b0f903a947f6a0e5a2730fb528c87 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 27 五月 2024 19:15:58 +0800
Subject: [PATCH] adapt to new model struct
---
runtime/onnxruntime/src/paraformer-torch.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/runtime/onnxruntime/src/paraformer-torch.cpp b/runtime/onnxruntime/src/paraformer-torch.cpp
index 113d43f..a5f7194 100644
--- a/runtime/onnxruntime/src/paraformer-torch.cpp
+++ b/runtime/onnxruntime/src/paraformer-torch.cpp
@@ -16,7 +16,7 @@
}
// offline
-void ParaformerTorch::InitAsr(const std::string &am_model, const std::string &am_cmvn, const std::string &am_config, int thread_num){
+void ParaformerTorch::InitAsr(const std::string &am_model, const std::string &am_cmvn, const std::string &am_config, const std::string &token_file, int thread_num){
LoadConfigFromYaml(am_config.c_str());
// knf options
fbank_opts_.frame_opts.dither = 0;
@@ -28,8 +28,8 @@
fbank_opts_.energy_floor = 0;
fbank_opts_.mel_opts.debug_mel = false;
- vocab = new Vocab(am_config.c_str());
- phone_set_ = new PhoneSet(am_config.c_str());
+ vocab = new Vocab(token_file.c_str());
+ phone_set_ = new PhoneSet(token_file.c_str());
LoadCmvn(am_cmvn.c_str());
torch::DeviceType device = at::kCPU;
--
Gitblit v1.9.1