Enterprise Developer Documentation

Build on TNSOR Speech AI

Drop-in OpenAI Whisper SDK compatibility, sub-300ms real-time WebSocket streaming, and autonomous voicebot telephony at 70% lower compute cost.

Documentation Index
api.tnsor.io (99.98% SLA)

Global Edge Anycast DNS with sub-50ms regional ingress.

1

Quickstart: 1-Line Drop-In OpenAI Replacement

TNSOR exposes an exact OpenAI-compliant POST /v1/audio/transcriptions endpoint. You do not need to rewrite your application or install a proprietary client library. Simply update your client's base URL:

from openai import OpenAI

# 1-Line Drop-in replacement for OpenAI or Deepgram
client = OpenAI(
    base_url="https://tnsor.ksverse.in/v1",  # TNSOR Global Anycast Edge
    api_key="tn_live_8f9c4a2b"              # Your scoped API Key
)

audio_file = open("customer_support_call.mp3", "rb")

transcription = client.audio.transcriptions.create(
    model="whisper-1",
    file=audio_file,
    response_format="json"
)

# Returns accurate transcript at $0.0014/min (67% cheaper)
print(transcription.text)
2

Real-Time Streaming Protocol (Sub-300ms TTFT)

For live voicebots and interactive phone calls, stream raw linear 16kHz PCM audio frames over WebSockets or HTTP chunked Server-Sent Events. Tokens stream back incrementally with a median TTFT of 140ms.

Python WebSocket Client (100ms Linear PCM Chunks)wss://api.tnsor.io/v1/listen
import asyncio
import websockets
import json

async def stream_live_speech():
    uri = "wss://api.tnsor.io/v1/listen?key=tn_live_8f9c4a2b&encoding=linear16&sample_rate=16000"

    async with websockets.connect(uri) as ws:
        print("Connected to TNSOR Live Streamer (TTFT < 200ms)")

        # Stream continuous 100ms audio slices (3200 bytes per slice)
        with open("mic_input.pcm", "rb") as f:
            while chunk := f.read(3200):
                await ws.send(chunk)
                response = await ws.recv()
                data = json.loads(response)

                if data.get("is_final"):
                    print("Locked Sentence:", data["text"])
                else:
                    print("Streaming Token:", data["text"], end="\r")

asyncio.run(stream_live_speech())
3

Conversational Voicebot Engine

When speech turns conclude, trigger POST /api/voicebot to generate low-latency conversational turns for customer service, technical architecture, or meeting synthesis.

Supported Personas

sales, support, tech, scribe

Average Turnaround

120ms – 160ms end-to-end

4

Telephony Integration (Twilio & Exotel Webhooks)

Connect enterprise call centers and automated telephone agents directly to TNSOR with standard TwiML media streaming:

TwiML / XML Media Stream Hook
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>Connecting to TNSOR Realtime Voicebot...</Say>
  <Connect>
    <Stream url="wss://api.tnsor.io/v1/telephony">
      <Parameter name="api_key" value="tn_live_your_key_here" />
      <Parameter name="persona" value="support" />
      <Parameter name="language" value="en-US" />
    </Stream>
  </Connect>
</Response>
5

Interactive Live API Explorer

Test TNSOR API endpoints live directly inside this console. Execute requests and view raw JSON responses and latency metrics.

6

Rate Limits & Enterprise SLA Specs

TNSOR assigns department-scoped rate limits based on your enterprise tier. All audio streams are processed in ephemeral GPU memory and purged immediately after transcription.

TierRate LimitMax Stream DurationTarget Latency (TTFT)Payment Remittance
Developer Free20 req/sec10 mins< 300ms$5 Pre-Paid Credit
Production Voicebot150 req/sec120 mins< 180msRazorpay / PayPal
Enterprise High Concurrency500+ req/secUnlimited< 120ms AnycastNet-30 GST Invoicing