Add audio flushing after sending text in RimeNonJsonTTSService

This update ensures that audio is flushed immediately after sending bare text to the WebSocket, improving the responsiveness of the Text-to-Speech service.
This commit is contained in:
Gokul Js
2025-11-19 22:19:00 +05:30
parent afeef94900
commit 1d9696e614

View File

@@ -833,6 +833,7 @@ class RimeNonJsonTTSService(InterruptibleTTSService):
# Send bare text (not JSON)
await self._get_websocket().send(text)
await self.start_tts_usage_metrics(text)
await self.flush_audio()
except Exception as e:
logger.error(f"{self} exception: {e}")