diff --git a/api-reference/asyncapi.yml b/api-reference/asyncapi.yml index 77ca07c4..1217f9a5 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. After a session that completed (reason='stop'), the connection stays open: send another StartEvent to run a new session on it, or close it with code 1000 ## 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,11 @@ 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. + When you no longer need the connection, close it + with code 1000. An open connection between sessions + does not count against your concurrency limit. examples: - payload: event: finish