From 6406616c2d3fd5eae0201cd4680258f7c4e937dd Mon Sep 17 00:00:00 2001
From: lyblsgo <lyblsgo@163.com>
Date: 星期一, 24 四月 2023 13:04:08 +0800
Subject: [PATCH] rename filenames
---
funasr/runtime/onnxruntime/src/commonfunc.h | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/commonfunc.h b/funasr/runtime/onnxruntime/src/commonfunc.h
index 237df86..cae1bd7 100644
--- a/funasr/runtime/onnxruntime/src/commonfunc.h
+++ b/funasr/runtime/onnxruntime/src/commonfunc.h
@@ -1,17 +1,14 @@
#pragma once
-
-
+#include <algorithm>
typedef struct
{
std::string msg;
-
-}RPASR_RECOG_RESULT;
+ float snippet_time;
+}FUNASR_RECOG_RESULT;
#ifdef _WIN32
#include <codecvt>
-
-
inline std::wstring string2wstring(const std::string& str, const std::string& locale)
{
@@ -28,8 +25,6 @@
}
#endif
-
-
inline void getInputName(Ort::Session* session, string& inputName,int nIndex=0) {
size_t numInputNodes = session->GetInputCount();
@@ -53,4 +48,9 @@
}
}
-}
\ No newline at end of file
+}
+
+template <class ForwardIterator>
+inline static size_t argmax(ForwardIterator first, ForwardIterator last) {
+ return std::distance(first, std::max_element(first, last));
+}
--
Gitblit v1.9.1