Skip to content

Commit

Permalink
Reset decoder model cached states
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Aug 14, 2023
1 parent 4fe32a7 commit 4bf9fdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sherpa-onnx/csrc/online-recognizer-paraformer-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ class OnlineRecognizerParaformerImpl : public OnlineRecognizerImpl {
OnlineParaformerDecoderResult r;
s->SetParaformerResult(r);

s->GetParaformerFeatCache().clear();
s->GetStates().clear();
s->GetParaformerEncoderOutCache().clear();
s->GetParaformerAlphaCache().clear();

// s->GetParaformerFeatCache().clear();

// Note: We only update counters. The underlying audio samples
// are not discarded.
s->Reset();
Expand Down

0 comments on commit 4bf9fdc

Please sign in to comment.