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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user