From 4cacf936bcfff40d14bca926d0025d9aa2185dbe Mon Sep 17 00:00:00 2001
From: manyeyes <32889020+manyeyes@users.noreply.github.com>
Date: 星期一, 16 十月 2023 11:26:09 +0800
Subject: [PATCH] Adjusting the project directory structure (#1010)
---
funasr/runtime/onnxruntime/src/commonfunc.h | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/commonfunc.h b/funasr/runtime/onnxruntime/src/commonfunc.h
index b74c1c1..9bd2a00 100644
--- a/funasr/runtime/onnxruntime/src/commonfunc.h
+++ b/funasr/runtime/onnxruntime/src/commonfunc.h
@@ -1,11 +1,16 @@
#pragma once
#include <algorithm>
+#ifdef _WIN32
+#include <codecvt>
+#endif
namespace funasr {
typedef struct
{
std::string msg;
- float snippet_time;
+ std::string stamp;
+ std::string tpass_msg;
+ float snippet_time;
}FUNASR_RECOG_RESULT;
typedef struct
@@ -21,7 +26,9 @@
}FUNASR_PUNC_RESULT;
#ifdef _WIN32
-#include <codecvt>
+
+#define ORTSTRING(str) StrToWstr(str)
+#define ORTCHAR(str) StrToWstr(str).c_str()
inline std::wstring String2wstring(const std::string& str, const std::string& locale)
{
@@ -37,8 +44,15 @@
}
+#else
+
+#define ORTSTRING(str) str
+#define ORTCHAR(str) str
+
#endif
+
+
inline void GetInputName(Ort::Session* session, string& inputName,int nIndex=0) {
size_t numInputNodes = session->GetInputCount();
if (numInputNodes > 0) {
--
Gitblit v1.9.1