From 01df8f330ccc754223d5e2d688dc0a55d27f2dcc Mon Sep 17 00:00:00 2001
From: querryton <72929808+querryton@users.noreply.github.com>
Date: 星期六, 20 四月 2024 16:07:13 +0800
Subject: [PATCH] [fix] Fix a bug in seaco_paraformer model "inference" function (#1639)
---
funasr/auto/auto_model.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index d173a53..ba8881a 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -417,7 +417,7 @@
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:
--
Gitblit v1.9.1