From 0c80bfaf4b58ef38f80f61b57efe578181ce0da3 Mon Sep 17 00:00:00 2001 From: Binbin Zhang Date: Wed, 23 Aug 2023 22:58:43 +0800 Subject: [PATCH] [binding] use seconds level timestamp --- runtime/core/api/wenet_api.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/core/api/wenet_api.cc b/runtime/core/api/wenet_api.cc index 15a01426b..0852a079b 100644 --- a/runtime/core/api/wenet_api.cc +++ b/runtime/core/api/wenet_api.cc @@ -163,8 +163,8 @@ class Recognizer { for (const auto& word_piece : decoder_->result()[i].word_pieces) { json::JSON piece; piece["word"] = word_piece.word; - piece["start"] = word_piece.start; - piece["end"] = word_piece.end; + piece["start"] = static_cast(word_piece.start) / 1000; + piece["end"] = static_cast(word_piece.end) / 1000; one["word_pieces"].append(piece); } }