For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityAPI StatusAPI PricingSign Up
DocumentationAPI ReferencesCookbookIntegrationDeveloper Tools
DocumentationAPI ReferencesCookbookIntegrationDeveloper Tools
  • API Reference
    • Introduction
    • Authentication
    • Access to Beta APIs
    • Meta Prompt Guide
  • Endpoints
      • POSTCreate
      • GETList
      • GETGet
      • PUTUpdate
      • DELDelete
LogoLogo
CommunityAPI StatusAPI PricingSign Up
EndpointsPronunciation Dictionary

Create

||View as Markdown|
POST
https://api.sarvam.ai/text-to-speech/pronunciation-dictionary
POST
/text-to-speech/pronunciation-dictionary
$curl -X POST https://api.sarvam.ai/text-to-speech/pronunciation-dictionary \
> -H "api-subscription-key: <apiSubscriptionKey>" \
> -H "Content-Type: multipart/form-data" \
> -F file=@custom_pronunciations.json
1{
2 "dictionary_id": "p_9f8a3b2c"
3}
Upload a `.json` file to create a new pronunciation dictionary. Only supported by **bulbul:v3**. The file should contain a JSON object with a `pronunciations` key mapping language codes to word-pronunciation pairs. See the [Pronunciation Dictionary guide](/api-reference-docs/api-guides-tutorials/text-to-speech/pronunciation-dictionary) for format details and examples. The returned `dictionary_id` can be passed as `dict_id` in text-to-speech requests (REST, HTTP Stream, and WebSocket). **Limits:** Max 10 dictionaries per user, 100 words per dictionary, 1 MB file size.
Was this page helpful?
Previous

List

Next
Built with

Upload a .json file to create a new pronunciation dictionary. Only supported by bulbul:v3.

The file should contain a JSON object with a pronunciations key mapping language codes to word-pronunciation pairs. See the Pronunciation Dictionary guide for format details and examples.

The returned dictionary_id can be passed as dict_id in text-to-speech requests (REST, HTTP Stream, and WebSocket).

Limits: Max 10 dictionaries per user, 100 words per dictionary, 1 MB file size.

Authentication

api-subscription-keystring
API Key authentication via header

Request

This endpoint expects a multipart form containing a file.
filefileRequired

Response

Successful Response
dictionary_idstring

Unique identifier for the created dictionary (e.g. p_5cb7faa6). Use this as the dict_id parameter in text-to-speech requests.

Errors

400
Bad Request Error
403
Forbidden Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error