Overview
Real-time streaming is built for applications that require immediate responsiveness, such as conversational AI, voice assistants, and interactive gaming. By using Transfer-Encoding: chunked, Lokutor begins delivering audio data the moment it’s generated, often achieving Time-To-First-Byte (TTFB) under 100ms.
| Quality | Latency (TTFB) | Audio Fidelity |
|---|
ultra_fast | ~50ms | Basic (speech clarity priority) |
medium | ~100ms | High (balanced) |
high | ~150ms | Premium (broadcast quality) |
Interactive Playground
Test the real-time speed of the Lokutor engine. The latency measurement shows exactly how fast we start delivering audio.
Endpoint Details
Technical Details
Chunked Transfer
This endpoint uses standard HTTP chunked transfer. Most modern libraries (like fetch with readable streams or axios with onDownloadProgress) can begin processing these chunks immediately.
Voice Selection
Pass the voice_id directly in the URL path. You can list all available voices using the Voices Status endpoint.
# Example streaming request
curl -X POST "https://api.lokutor.com/api/tts/F1/stream" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--no-buffer \
-d '{
"text": "Starting a real-time stream...",
"quality": "ultra_fast"
}'
When using streaming, set speed: 1.0 for the most natural cadence during real-time interactions.