From b251ee93225b8177661b84e7978c2023f31a0a64 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:45:59 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=A9=BA=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- astrbot/core/provider/sources/gsv_selfhosted_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/provider/sources/gsv_selfhosted_source.py b/astrbot/core/provider/sources/gsv_selfhosted_source.py index ff0083a1a..88f68e953 100644 --- a/astrbot/core/provider/sources/gsv_selfhosted_source.py +++ b/astrbot/core/provider/sources/gsv_selfhosted_source.py @@ -106,7 +106,7 @@ class ProviderGSVTTS(TTSProvider): async def get_audio(self, text: str) -> str: """实现 TTS 核心方法,根据文本内容自动切换情绪""" - if not text: + if not text.strip(): raise ValueError("[GSV TTS] TTS 文本不能为空") endpoint = f"{self.api_base}/tts"