Dictate API
The SDK examples use the pre-release SDKs: sarvamai 0.1.49a1 for Python and 1.1.22-alpha.1 for
JavaScript. The install commands are in the Quickstart.
Sarvam Dictate is a dictation API that turns audio into the text a person meant to type, in English and 22 Indian languages. One call pairs Saaras v4, Sarvam’s ASR model, which hears the audio and writes the transcript, with Sarvam 105B. Sarvam 105B reads that transcript together with context from your app: a vocabulary of the user’s names and terms, a document such as a CRM record or product list, a line about the situation, and a style. It returns the finished text next to the raw transcript and can apply up to 1000 keyterms.
Want to try it right now? Jump to the quickstart.
See it work
Clean text
Chat message
Your names
Bullets, in English
JSON for a form
Drop the “um”, the repeats and the false starts, and keep the corrected version. This is the default.
Every example here was produced by running the code on the live API. The recipes show the code for each one.
What you can build
Which route should I use?
Pick the route by the audio you have.
Not sure? Start with a clip. It is the shortest path, and the quickstart below uses it.
Quickstart
Get a key and install the SDK
Create an API key on the dashboard and set it as SARVAM_API_KEY. Dictate reads the key from the api-subscription-key header or from Authorization: Bearer <key>: either one is enough. You need Python 3.8 or later, or Node.js 18 or later.
Get a test clip
Any recording of 30 s or less works: WAV, MP3, M4A and more. Record your own, or make one with the tool for your system:
Any system (Python)
macOS
Linux
Windows
Use Sarvam’s own text to speech. It needs the SDK and SARVAM_API_KEY from step 1.
What you get back
Customize the request
Each setting answers one question. Leave a field out to keep its default.
Dictate or Speech-to-Text?
Both turn speech into text. Choose by what the text is for.
Here is the same recording through each.
Use Dictate when the text goes straight to a person or a system: a chat message, a note, a CRM record or form, meeting minutes. The finishing, the names and the JSON are done for you.
Use Speech-to-Text (Saaras) when you need the raw transcript, for search or analytics, or the longest files, or a voice agent that reacts to partial transcripts while the user is still speaking.
You can use both: keep the Speech-to-Text transcript for your records, and use Dictate for the text you show.
What Dictate doesn’t do
If you are comparing APIs, check this list first. Dictate does not offer:
- Subtitle files. There is no SRT or VTT output.
- Browser tokens. There are no short-lived tokens, so a browser or app cannot open the socket safely. Open it from your server.
- Translation as a mode. There is no
translatemode. Ask for it instyle.rules.
Limitations lists every limit.
Pricing and rate limits
- Price. Dictate costs ₹0.50 per minute of audio on Pay as you go, and less on Pro, Growth and Business. Every response has a
usagefield with the audio length in seconds (audio_duration_s) and the token counts. It does not show an amount, so multiply the minutes by your price. All prices are on the pricing page. - Rate limits. They are the same as Speech-to-Text, and are listed under Dictate limits.
- Over a limit. The API answers
429with aRetry-Afterheader. The SDKs wait and try again by themselves. See Handle errors and retries.