Update asr_inference_paraformer_streaming.py

This commit is contained in:
hnluo 2023-04-27 01:57:42 +08:00 committed by GitHub
parent 9ff5b683db
commit 493dda8f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,6 +206,8 @@ class Speech2Text:
cache_en["tail_chunk"] = True
feats = cache_en["feats"]
feats_len = torch.tensor([feats.shape[1]])
results = self.infer(feats, feats_len, cache)
return results
else:
if self.frontend is not None:
feats, feats_len = self.frontend.forward(speech, speech_lengths, cache_en["is_final"])