Multi-Context WebSocket

The Multi-Context Text-to-Speech WebSockets API allows for generating audio from text input while managing multiple independent audio generation streams (contexts) over a single WebSocket connection. This is useful for scenarios requiring concurrent or interleaved audio generations, such as dynamic conversational AI applications. Each context, identified by a context id, maintains its own state. You can send text to specific contexts, flush them, or close them independently. A `close_socket` message can be used to terminate the entire connection gracefully. For more information on best practices for how to use this API, please see the [multi context websocket guide](/docs/eleven-api/guides/how-to/websockets/multi-context-web-socket).