Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

empty result bug fix

维石dee1354d0d98
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index d173a533c..ba8881aa4 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -417,7 +417,7 @@ class AutoModel:
return_raw_text = kwargs.get('return_raw_text', False)
# step.3 compute punc model
if self.punc_model is not None:
- if not len(result["text"]):
+ if not len(result["text"].strip()):
if return_raw_text:
result['raw_text'] = ''
else: