Voice API

Your Own Speech Voice

Use your own Sarvam AI key and voice for everything TryVox speaks, instead of the platform voice.

By default, every Say in your VoxML is spoken by the platform voice. You can replace it with a voice from your own Sarvam AI account — your key, your model, your speaker, your quota.

This changes what callers hear. It does not change how you write VoxML: Say keeps working exactly as documented, and your voice is used automatically once it is active.

Scope: one voice per account

A voice is configured per account, and an account means whoever the credential belongs to:

WhoGets
Your accountIts own key and voice
Each of your sub-accountsIts own key and voice, set independently

There is no inheritance in either direction. A sub-account does not use its parent's voice, and configuring a voice on a sub-account never touches the parent's. A sub-account that has not configured one uses the platform voice.

This is deliberate for partners: your customers' calls spend their own Sarvam quota, not yours, and no customer can read or overwrite your key.

The endpoints below carry no account in the path — the account is whoever the credential identifies. A sub-account calling them with its own credentials configures its own voice, with nothing extra to pass.

Set a voice from the console

Voice → Settings → Speech, or go straight to /app/voice/speech.

  1. Paste your Sarvam API key.
  2. Choose a model and a speaker. The two are a pair — Sarvam speakers are model-specific, and a bulbul:v3 speaker sent against bulbul:v4-flash is rejected by the provider.
  3. Save. TryVox synthesizes a test phrase with your key immediately; the result is the status you see.
  4. Use Preview to hear the exact audio a caller would get.

Set a voice over the API

Your app
PUT https://api.tryvox.io/v1/tts/voice
request
TryVox
processing
response
Response 200
returned to your app
curl -X PUT https://api.tryvox.io/v1/tts/voice \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  -H 'Content-Type: application/json' \
  -d '{
    "provider": "sarvam",
    "name": "Sarvam Bulbul v4 Flash",
    "api_key": "YOUR_SARVAM_KEY",
    "model": "bulbul:v4-flash",
    "speaker": "simran_en_customer",
    "pace": 1.0
  }'
FieldTypeRequiredDescription
providerstringyessarvam. The only provider today.
api_keystringyesYour Sarvam key. Stored encrypted and never returned.
modelstringyesbulbul:v4-flash or bulbul:v3.
speakerstringnoA speaker valid for that model. Defaults to the model's default.
namestringnoYour own label for the integration.
pacenumbernoSpeaking rate.

The response is the stored voice without the key, carrying the verification result:

{
  "data": {
    "provider": "sarvam",
    "name": "Sarvam Bulbul v4 Flash",
    "model": "bulbul:v4-flash",
    "speaker": "simran_en_customer",
    "status": "active",
    "last_verified_at": "2026-11-19T09:14:22Z",
    "pace": 1
  }
}

Status, and what it means for live calls

Saving does not take effect until the key has actually synthesized something. TryVox verifies on save and stores the outcome:

StatusWhat your calls use
activeYour voice. Verified working.
pendingThe platform voice. Saved but not yet proven.
invalid_credentialsThe platform voice. The key was rejected.
disabledThe platform voice.

Only active changes what callers hear. This is the point of the status: a wrong key degrades your settings page, never your live IVR. When something fails, last_error carries the provider's own message.

Speech also falls back to the platform voice if a synthesis attempt fails mid-call, so a provider outage makes your IVR sound different — not silent.

Other endpoints

MethodPathPurpose
GET/v1/tts/voiceThe configured voice. Never returns the key. 404 means no voice is set.
DELETE/v1/tts/voiceRemove it and return to the platform voice.
GET/v1/tts/providersProviders, models, their speaker shortlists and languages.
GET/v1/tts/speakers?model=bulbul:v4-flashSpeakers for a model, read live from Sarvam with your key where possible.
POST/v1/tts/voice/previewSynthesize a phrase with your saved voice. Returns 8 kHz WAV — the same audio a call would hear.
curl -X POST https://api.tryvox.io/v1/tts/voice/preview \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  -H 'Content-Type: application/json' \
  -d '{"text": "Your call is being connected.", "language": "en-IN"}' \
  --output preview.wav

Who may configure it

Speech settings hold a provider API key, so they are treated as credential management:

  • An account owner or team admin may configure them.
  • A sub-account may configure its own, by its login or by an API key issued to it.
  • A team editor or viewer on someone else's account may not — including the preview, which renders with the stored key.

Notes

  • The speaker list for a model is a shortlist, not the whole set — bulbul:v4-flash alone has over 200. You may send any speaker id Sarvam accepts; GET /v1/tts/speakers reads the live set with your key.
  • Each model has a maximum text length per request. GET /v1/tts/providers reports it.
  • Telephony audio is 8 kHz and TryVox selects that itself — format and sample rate are not yours to set.
  • Say's voice and engine parameters are unrelated to this. They do not select a provider; see Say.

On this page