v1
latestOpenAPI 3.1.02026-07-1312416.2 KBSse Generator
Handles the /sse/speak/{lang_code} POST endpoint for generating speech using Server-Sent Events (SSE).
This endpoint enables real-time streaming of text-to-speech (TTS) responses in the specified language. The generated speech is sent as a continuous stream to the client using SSE.
Args: lang_code (str): The unique identifier for the language in which speech will be generated. request_data (dict): The body of the request containing the input text and additional configuration for TTS.
Returns: StreamingResponse: A Server-Sent Events (SSE) stream that transmits the generated speech in real-time.
Raises: HTTPException: Raised if there is an issue with the input data, language code, or TTS generation process. Exception: Logs and raises any unexpected errors encountered during the operation.
Path parameters
Query parameters
Headers
Request body
Response
Successful Response