Documentation Index
Fetch the complete documentation index at: https://docs.inya.ai/llms.txt
Use this file to discover all available pages before exploring further.
Currently in beta. You’re on the priority waitlist and among the first to get access.
Overview
Stream audio in real-time with the lowest latency. Perfect for interactive assistants and live applications. For simpler use cases, see TTS REST or TTS SSE.Passing numbers, IDs, dates, or currency as raw strings causes mispronunciations. See the Input Formatting Guide for correct formatting of phone numbers, account numbers, PINs, Aadhaar, vehicle registration numbers, GSTIN, currency, and more.
Endpoint
Authentication
All Realtime connections require the following headers:| Header | Required | Description | Example |
|---|---|---|---|
Content-Type | Yes | Must be application/json | application/json |
X-API-Key-ID | Yes | Your API key for authentication | <your-api-key-id> |
Request Format
Send a JSON message with the following structure:Number of audio channels (e.g.,
1 for mono, 2 for stereo)Sample width in bytes (e.g.,
2 for 16-bit audio)Audio encoding format (e.g.,
linear_pcm)Audio container format (e.g.,
wav)Response
The server streams audio data in real-time as binary chunks. Each chunk contains PCM audio data according to the specifiedaudio_config.
Example Usage
Python SDK
The SDK’s realtime client manages the WebSocket lifecycle, audio streaming, and async iteration so you can focus on your application logic.Installation
Authentication
Stream Audio Chunks in Real-Time
Use the async context manager to open the connection and iterate over audio chunks as they arrive.Collect All Audio at Once
If you don’t need to process chunks as they arrive, usesynthesize_and_collect to get the full audio as a single bytes object.