mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 16:03:56 +08:00
tts 失败重试bug修复
This commit is contained in:
@@ -32,4 +32,6 @@ class TTSProvider(TTSProviderBase):
|
||||
with open(output_file, "wb") as file:
|
||||
file.write(resp.content)
|
||||
else:
|
||||
logger.bind(tag=TAG).error(f"Custom TTS请求失败: {resp.status_code} - {resp.text}")
|
||||
error_msg = f"Custom TTS请求失败: {resp.status_code} - {resp.text}"
|
||||
logger.bind(tag=TAG).error(error_msg)
|
||||
raise Exception(error_msg) # 抛出异常,让调用方捕获
|
||||
|
||||
Reference in New Issue
Block a user