Sse 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.

post/sse/speak/{lang_code}

Request

  • Base URL: https://api.neuphonic.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.neuphonic.com/sse/speak/{lang_code}
  • Auth: none declared

Path parameters

lang_codestring required

Query parameters

api_keystring nullable
jwt_tokenstring nullable

Headers

X-API-KEYstring nullable
authorizationstring nullable

Request body

unknown required

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 6 revisions of this API.