WebSockets

The channel for sending TTS requests and receiving audio responses. Use this WebSocket endpoint to stream text and receive audio in real time.

HandshakeTry it

WSS
https://wss//api.murf.ai/v1/speech/stream-input

Headers

api_keystringOptional
Your Murf API key.

Query parameters

api_keystringOptional
Your Murf API key.
sample_ratestringOptionalDefaults to 44100
The sample rate for audio output.
channel_typestringOptionalDefaults to MONO
The channel type for audio output.
formatstringOptionalDefaults to WAV
Audio format of the output. Valid values are MP3, WAV, PCM.

Send

setVoiceConfigurationOrInitializeContextobjectRequired
OR
sendTextobjectRequired
OR
setAdvancedSettingsobjectRequired
OR
clearContextobjectRequired

Receive

audioOutputobjectRequired
OR
finalOutputobjectRequired