From 11d5964951103eeaa7acdbf45bb01b47286705b9 Mon Sep 17 00:00:00 2001 From: aky15 Date: Thu, 14 Sep 2023 16:08:53 +0800 Subject: [PATCH] Update asr_infer.py rename simu_streaming to fake_streaming --- funasr/bin/asr_infer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/funasr/bin/asr_infer.py b/funasr/bin/asr_infer.py index 3d72ec4e2..3117e5dac 100644 --- a/funasr/bin/asr_infer.py +++ b/funasr/bin/asr_infer.py @@ -1337,7 +1337,7 @@ class Speech2TextTransducer: quantize_dtype: str = "qint8", nbest: int = 1, streaming: bool = False, - simu_streaming: bool = False, + fake_streaming: bool = False, full_utt: bool = False, chunk_size: int = 16, left_context: int = 32, @@ -1432,7 +1432,7 @@ class Speech2TextTransducer: self.beam_search = beam_search self.streaming = streaming - self.simu_streaming = simu_streaming + self.fake_streaming = fake_streaming self.full_utt = full_utt self.chunk_size = max(chunk_size, 0) self.left_context = left_context @@ -1442,8 +1442,8 @@ class Speech2TextTransducer: self.streaming = False self.asr_model.encoder.dynamic_chunk_training = False - if not simu_streaming or chunk_size == 0: - self.simu_streaming = False + if not fake_streaming or chunk_size == 0: + self.fake_streaming = False self.asr_model.encoder.dynamic_chunk_training = False self.frontend = frontend @@ -1520,7 +1520,7 @@ class Speech2TextTransducer: return nbest_hyps @torch.no_grad() - def simu_streaming_decode(self, speech: Union[torch.Tensor, np.ndarray]) -> List[HypothesisTransducer]: + def fake_streaming_decode(self, speech: Union[torch.Tensor, np.ndarray]) -> List[HypothesisTransducer]: """Speech2Text call. Args: speech: Speech data. (S)