Overview
Prisma v2.5 is Gnani’s default speech-to-text model. You send it audio of someone speaking, tell it which language to expect, and it returns the words as text. What it gives you:- Ten languages. Nine Indian languages and English, each requested by its language code. You send one language code with every request (see Languages).
- Number formatting.
format=transcribewrites numbers, currency, dates, times and phone numbers the way a reader expects, for example₹5,000instead of “five thousand rupees” (see Output styles). - Word boosting.
bias_listandbias_scorenudge the model towards brand names and other words it tends to mishear (see Word boosting). - Find-and-replace. Rewrite words in the final transcript, for example
oktoacknowledged(see Find-and-replace).
Prisma v2.5 is the default. If a request does not choose a model, the API uses Prisma v2.5, so existing integrations keep working unchanged. For automatic language detection (
indic-auto), lists of one to four languages, the codemix and transliterate output styles and context hints, see Prisma v3.0. For all models, see Models.Quick facts
Selecting Prisma v2.5
Prisma v2.5 runs unless you ask for another model. On REST, leavemodel out: the REST endpoint does not accept gnani-prisma-v2.5 as a value and returns 400 INVALID_MODEL. On Realtime, leave out x-model. On Batch, set config.model to gnani-prisma-v2.5. See Where you can use it.
The 3 in /stt/v3 is the URL version, not the model version. How models and URLs relate, and how to select each model, is explained on the Models page.
To use Prisma v3.0 instead, add model=prisma-v3.0 to your request. To go back, remove it.
Where you can use it
Gnani offers several ways to send audio. Prisma v2.5 works with all of them.Try it
This request sends one audio file and asks for Hindi. Replace<API_KEY> with your Gnani API key and clip.wav with your own file (up to 30 seconds).
The example above shows the main fields. The full field list for the response is on REST transcription.
Languages
Use these codes inlanguage_code (or lang_code when streaming). Each code is a language followed by a region, for example hi-IN for Hindi as spoken in India.
Prisma v2.5 does not identify the language for you. You send the language you expect, and the audio is transcribed in it. Automatic detection (
indic-auto) is a Prisma v3.0 feature.
How you give the language depends on how you send the audio:
Output styles
The same audio can be written two ways. Set it withformat (REST) or x-format (Realtime).
verbatimis always the default. If you leave outformat, you getverbatim, whatever the language.- ITN currently works for
hi-INanden-INonly. - Not available on Batch.
formatis a Prisma v3.0 option on Batch, and ITN is not supported there. A Batch job on Prisma v2.5 that sendsformatreturns400 INVALID_CONFIG. - The other two styles belong to Prisma v3.0.
codemixandtransliterateare not available on Prisma v2.5.
The same clip in both styles
Digits in the native script
Withformat=transcribe, set itn_native_numerals=true to write digits in the native script of the language instead of Western digits. It has no effect with verbatim.
On REST the field is
itn_native_numerals. When streaming, the connection header is also called itn_native_numerals, with no x- prefix. (On Prisma v3.0 the header is x-itn-native-numerals, and it has no effect.)
Output style when streaming
transcript message also carries output.literal with the text before formatting. For what ITN converts and what it leaves alone, see the ITN reference.
Word boosting
Word boosting nudges the model towards specific words, so they are more likely to be written correctly. Use it for brand names, product names and other terms the model tends to mishear. It changes recognition itself. It is not a find-and-replace. Send both fields together:
Start at
1.0 and raise it only if a word is still missed. A stronger score can make the model favour a listed word where it was not spoken.
- Each entry is one word, letters only. Latin or Indian-script letters. No spaces, digits, punctuation or symbols, so
"loan number"andHDFC2are not allowed. - Casing does not matter.
- Use
format=verbatim. Boost words are spoken-form words, so digit strings and formatted numbers will not work. - Bad input is skipped, not rejected. On REST and when streaming, if any entry breaks the rules or
bias_scoreis not an allowed value, the whole list is ignored and the audio is transcribed without boosting. You still get a normal response. The exception on REST is abias_scorethat is not a number at all (for exampleabc), which is rejected with422. On Batch, an invalid list or score is rejected when the job is created (400 INVALID_CONFIG). - Works on REST, Realtime and Batch. Streaming uses the headers
x-bias-listandx-bias-score, and you can change them mid-session withupdate_settings. See Word boosting on Realtime and Word boosting on Batch.
Prisma v3.0 replaces this with
keyterms (up to 200 words or short phrases), topic, previous_text and speaker_names. See Context.Find-and-replace
After recognition, and after number formatting if you use it, the API can rewrite words in the final transcript. Use it to standardise terms, for examplers to INR.
Each rule has
patterns, the strings to find, and replacement, the text to put in their place. Matching ignores case and respects Unicode word boundaries, so ok matches OK but not okay. Rules are applied in a single pass, and longer phrases win over shorter ones.
x-enable-substitution and x-substitution-map, which you can change mid-session). It is not supported on Batch. See Find-and-replace on REST and on Realtime for the full rules.
Batch jobs
A Batch job on Prisma v2.5 setsconfig.model to gnani-prisma-v2.5. The language is identified per file, from up to three codes, and diarization, denoising and webhooks are the same as for every model.
Number formatting (ITN),
previous_text and find-and-replace are not available on Batch. The full reference is Batch transcription.
What Prisma v2.5 does not do
These are capabilities of Prisma v3.0. They are not available on Prisma v2.5:- Automatic language detection (
indic-auto) and lists of languages on REST and Realtime. You choose one language. (Batch accepts up to three codes.) detected_language_codein the response.- The
codemixandtransliterateoutput styles. - Context hints:
keyterms,topic,previous_textandspeaker_names. Prisma v2.5 has word boosting instead.
- REST accepts clips of up to 30 seconds. Use the Batch Jobs API for longer recordings.
- Realtime streaming is single-language: one
lang_codeper session. - ITN works for
hi-INanden-INonly, and is not available on Batch.
Limits
Request rates and the full table, including Prisma v3.0, are on Limits.
How it differs from Prisma v3.0
The differences are listed in one table on the Prisma v3.0 page: How it differs from Prisma v2.5. Check it before you switch, and send a few representative recordings through both models using the sameformat.
Next steps
- Models: all Speech-to-Text models and how to choose between them.
- Prisma v3.0: the newer multilingual model.
- Speech-to-Text overview: what works on REST, Realtime and Batch.
- Reference: REST, Realtime and Batch.
- Error Reference and Limits.