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

EndpointPurpose
wss://…/v1/tts/streamBidirectional streaming synthesis
POST /v1/ttsSynthesise a complete text and return one file
GET /v1/voicesList voices, languages and styles
POST /v1/lexiconsAdd custom pronunciations

SDKs

JavaScript and Python SDKs are planned for the beta, with a WebRTC client in the Voice Agent Kit.

Join the waitlist for API access