File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ const SherpaOnnxOnlineRecognizerResult *GetOnlineStreamResult(
222
222
}
223
223
r->tokens_arr = tokens_temp;
224
224
225
- if (!result.timestamps .empty ()) {
225
+ if (!result.timestamps .empty () && result. timestamps . size () == r-> count ) {
226
226
r->timestamps = new float [r->count ];
227
227
std::copy (result.timestamps .begin (), result.timestamps .end (),
228
228
r->timestamps );
@@ -490,7 +490,7 @@ const SherpaOnnxOfflineRecognizerResult *GetOfflineStreamResult(
490
490
}
491
491
r->tokens_arr = tokens_temp;
492
492
493
- if (!result.timestamps .empty ()) {
493
+ if (!result.timestamps .empty () && result. timestamps . size () == r-> count ) {
494
494
r->timestamps = new float [r->count ];
495
495
std::copy (result.timestamps .begin (), result.timestamps .end (),
496
496
r->timestamps );
You can’t perform that action at this time.
0 commit comments