mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
TTS合成超时后,如果有异步需要处理,可以重新连接合成
This commit is contained in:
parent
920e24b4ff
commit
ece3aa903b
1 changed files with 3 additions and 2 deletions
|
|
@ -285,8 +285,9 @@ class TTSProvider(TTSProviderBase):
|
|||
async def text_to_speak(self, text, _):
|
||||
try:
|
||||
if self.ws is None:
|
||||
logger.bind(tag=TAG).warning(f"WebSocket连接不存在,终止发送文本")
|
||||
return
|
||||
logger.bind(tag=TAG).debug(f"WebSocket连接不存在,重新启动TTS会话...")
|
||||
await self.start_session(self.task_id)
|
||||
logger.bind(tag=TAG).debug("TTS会话启动成功")
|
||||
filtered_text = MarkdownCleaner.clean_markdown(text)
|
||||
run_request = {
|
||||
"header": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue