From 5999ad7a2ebabe9f29ffd5d5e239c391ef3ca78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=BE=E8=81=AA?= Date: Wed, 3 Jan 2024 13:45:38 +0800 Subject: [PATCH] update TimestampSentence format --- runtime/onnxruntime/src/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/onnxruntime/src/util.cpp b/runtime/onnxruntime/src/util.cpp index 0fbec4f7b..7723e5f4e 100644 --- a/runtime/onnxruntime/src/util.cpp +++ b/runtime/onnxruntime/src/util.cpp @@ -584,7 +584,7 @@ std::string TimestampSentence(std::string &text, std::string &str_time){ } } // format - ts_sent += "{'text_seg':'" + text_seg + "',"; + ts_sent += "{'text_seg':\"" + text_seg + "\","; ts_sent += "'punc':'" + characters[idx_str] + "',"; ts_sent += "'start':'" + to_string(start) + "',"; ts_sent += "'end':'" + to_string(end) + "',"; @@ -621,7 +621,7 @@ std::string TimestampSentence(std::string &text, std::string &str_time){ end = ts_seg[ts_seg.size()-1][1]; } // format - ts_sent += "{'text_seg':'" + text_seg + "',"; + ts_sent += "{'text_seg':\"" + text_seg + "\","; ts_sent += "'punc':'',"; ts_sent += "'start':'" + to_string(start) + "',"; ts_sent += "'end':'" + to_string(end) + "',";