perf: 优化空文本检测

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
Soulter
2025-06-18 23:45:59 +08:00
committed by GitHub
parent 14c29f07bd
commit b251ee9322
@@ -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"