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

@@ -44,11 +44,11 @@ struct OnlineRecognizerResult {
/// When an endpoint is detected, it is incremented
int32_t segment = 0;
/// Starting frame of this segment.
/// Starting time of this segment.
/// When an endpoint is detected, it will change
float start_time = 0;
/// True if this is the last segment.
/// True if the end of this segment is reached
bool is_final = false;
/** Return a json string.