From aae5661eeb5256b2e2f3d253ab00b78615a4a5df Mon Sep 17 00:00:00 2001 From: Felix Lu <58391009+lumpinif@users.noreply.github.com> Date: Wed, 2 Dec 2026 19:18:19 -0800 Subject: [PATCH] docs: the TTS WebSocket connection stays open after finish The spec said the server closes the connection after FinishEvent. It does not: the connection stays open and accepts another StartEvent, as the /v1/tts/live/with-timestamp reference already says. --- api-reference/asyncapi.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api-reference/asyncapi.yml b/api-reference/asyncapi.yml index afec659e..25f4c11a 100644 --- a/api-reference/asyncapi.yml +++ b/api-reference/asyncapi.yml @@ -15,7 +15,7 @@ info: 3. **Client** streams TextEvent messages with text chunks 4. **Server** streams back AudioEvent messages with generated audio 5. **Client** sends CloseEvent to signal completion - 6. **Server** sends FinishEvent and closes connection + 6. **Server** sends FinishEvent. The connection stays open: send another StartEvent to run a new session on it, or close it ## Message Serialization @@ -332,7 +332,7 @@ components: Signals the end of the text stream. After sending this event, the server will finish synthesizing any remaining - buffered text and send a FinishEvent before closing the connection. + buffered text and send a FinishEvent. The connection stays open. examples: - payload: event: stop @@ -395,7 +395,9 @@ components: - If reason='stop', synthesis completed successfully - If reason='error', an error occurred (client should handle gracefully) - The WebSocket connection will close after this event. + After a session that completed (reason='stop'), the WebSocket connection + stays open. To run another session, send a new StartEvent on it; otherwise + close the connection. examples: - payload: event: finish