Kognivya Technologies
Docs and API
A preview of the Voice Stream API. The full reference, SDKs and API keys open to beta users first.
This page is a placeholder. Endpoint names and message formats may change before general availability.
Quick start
Open a WebSocket, authenticate, send text as it becomes available, and play audio chunks as they arrive.
const ws = new WebSocket('wss://api.kognivya.com/v1/tts/stream?voice=en-IN-asha');
ws.onopen = () => {
ws.send(JSON.stringify({ type: 'auth', token: KOGNIVYA_API_KEY }));
ws.send(JSON.stringify({ type: 'text', text: 'Your order has shipped ' }));
ws.send(JSON.stringify({ type: 'text', text: 'and should arrive on Thursday.' }));
ws.send(JSON.stringify({ type: 'flush' }));
};
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === 'audio') player.enqueue(msg.data); // base64 PCM or Opus chunk
if (msg.type === 'words') captions.add(msg.timestamps); // word timings in ms
};Endpoints
| Endpoint | Purpose |
|---|---|
wss://…/v1/tts/stream | Bidirectional streaming synthesis |
POST /v1/tts | Synthesise a complete text and return one file |
GET /v1/voices | List voices, languages and styles |
POST /v1/lexicons | Add custom pronunciations |
SDKs
JavaScript and Python SDKs are planned for the beta, with a WebRTC client in the Voice Agent Kit.

