From bef2d3a3911e63d7bf57132bf922a035c9c4bdce Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期四, 10 十月 2024 15:44:58 +0800
Subject: [PATCH] Merge branch 'main' of https://github.com/alibaba-damo-academy/FunASR into main
---
runtime/onnxruntime/src/fsmn-vad.cpp | 26 +-------------------------
1 files changed, 1 insertions(+), 25 deletions(-)
diff --git a/runtime/onnxruntime/src/fsmn-vad.cpp b/runtime/onnxruntime/src/fsmn-vad.cpp
index c832274..b120c19 100644
--- a/runtime/onnxruntime/src/fsmn-vad.cpp
+++ b/runtime/onnxruntime/src/fsmn-vad.cpp
@@ -30,7 +30,7 @@
try{
YAML::Node frontend_conf = config["frontend_conf"];
- YAML::Node post_conf = config["vad_post_conf"];
+ YAML::Node post_conf = config["model_conf"];
this->vad_sample_rate_ = frontend_conf["fs"].as<int>();
this->vad_silence_duration_ = post_conf["max_end_silence_time"].as<int>();
@@ -72,38 +72,14 @@
in_names->resize(num_nodes);
for (int i = 0; i < num_nodes; ++i) {
std::unique_ptr<char, Ort::detail::AllocatedFree> name = session->GetInputNameAllocated(i, allocator);
- Ort::TypeInfo type_info = session->GetInputTypeInfo(i);
- auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
- ONNXTensorElementDataType type = tensor_info.GetElementType();
- std::vector<int64_t> node_dims = tensor_info.GetShape();
- std::stringstream shape;
- for (auto j: node_dims) {
- shape << j;
- shape << " ";
- }
- // LOG(INFO) << "\tInput " << i << " : name=" << name.get() << " type=" << type
- // << " dims=" << shape.str();
(*in_names)[i] = name.get();
- name.release();
}
// Output info
num_nodes = session->GetOutputCount();
out_names->resize(num_nodes);
for (int i = 0; i < num_nodes; ++i) {
std::unique_ptr<char, Ort::detail::AllocatedFree> name = session->GetOutputNameAllocated(i, allocator);
- Ort::TypeInfo type_info = session->GetOutputTypeInfo(i);
- auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
- ONNXTensorElementDataType type = tensor_info.GetElementType();
- std::vector<int64_t> node_dims = tensor_info.GetShape();
- std::stringstream shape;
- for (auto j: node_dims) {
- shape << j;
- shape << " ";
- }
- // LOG(INFO) << "\tOutput " << i << " : name=" << name.get() << " type=" << type
- // << " dims=" << shape.str();
(*out_names)[i] = name.get();
- name.release();
}
}
--
Gitblit v1.9.1