Set is_final and start_time for online websocket server. (#342)

* Set is_final and start_time for online websocket server.

* Convert timestamps to a json array
This commit is contained in:
Fangjun Kuang
2023-09-25 15:12:07 +08:00
committed by GitHub
parent c2518a5826
commit 552a267c23
10 changed files with 64 additions and 275 deletions

View File

@@ -267,14 +267,14 @@ std::string OfflineRecognitionResult::AsJsonString() const {
<< "timestamps"
<< "\""
<< ": ";
os << "\"[";
os << "[";
std::string sep = "";
for (auto t : timestamps) {
os << sep << std::fixed << std::setprecision(2) << t;
sep = ", ";
}
os << "]\", ";
os << "], ";
os << "\""
<< "tokens"