Websocket

The Websocket API allows you to send text to the server and receive audio in real-time. This is useful for applications that require low-latency audio responses.

Establishing a Connection

You can establish a connection to the Neuphonic Websocket TTS endpoint through

wss://eu-west-1.api.neuphonic.com/speak/{lang_code}

On most languages where a header can be sent with the connection, you should send the x-api-key header with the value, otherwise it can be passed as a query parameter, i.e.

wss://eu-west-1.api.neuphonic.com/speak/en?api_key={YOUR_API_KEY}