Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
Update asr_infer.py
aky1511d596495110
diff --git a/funasr/bin/asr_infer.py b/funasr/bin/asr_infer.pyindex 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_searchself.streaming = streaming- self.simu_streaming = simu_streaming+ self.fake_streaming = fake_streamingself.full_utt = full_uttself.chunk_size = max(chunk_size, 0)self.left_context = left_context@@ -1442,8 +1442,8 @@ class Speech2TextTransducer:self.streaming = Falseself.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 = Falseself.asr_model.encoder.dynamic_chunk_training = Falseself.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)