Skip to main content
Panini is SomyaLabs’ text-to-speech model. It streams natural, low-latency audio via POST /v1/speech/synthesize.

Request

Supported languages

Panini supports 15 languages:

Voices

The five built-in voices use the same public names in the playground and API: Omit voice to use Arjun by default. The backend resolves the selected public voice to its internal model adapter before contacting the inference server. When language is provided, the backend forwards it to the model as lang. When it is omitted, the model detects the spoken language from text.
Pass a built-in slug (e.g. arjun) as voice, or pass a voice_id from GET /v1/voices for a saved voice. panini is the model name, not a voice. To get built-in voice IDs, call GET /v1/voices?type=system; the default type=all also includes your uploaded voices. Use the slugs in the table above when sending voice.
For example, {"text":"Namaste!","voice":"arjun"} selects Arjun. The playground’s modelId and outputFormat fields are not part of this API request.

Streaming response (NDJSON)

The endpoint responds with application/x-ndjson — one JSON object per line:
Two ways to consume it:
  • Stream playback — decode each chunk_b64 as it arrives and play the chunks back-to-back to start audio almost immediately.
  • Whole file — ignore partials and keep the is_final: true chunk; it’s the complete WAV, ideal for saving or replay.
Python — save the final WAV

Reference audio

ref_audio is a base64-encoded audio sample for one-off voice cloning. For a reusable custom voice, upload a WAV or WebM file with POST /v1/voices and then pass the returned data.voice_id as voice_id when synthesizing.
Built-in voices are sent to the model server as speaker adapter names. Uploaded voices and ref_audio use reference audio instead. Choose one voice selection method per request.