Skip to main content
Mira STT transcribes ten languages, on HTTP and on the socket alike: All ten are live for production calls. Every language takes the same requests, returns the same events and costs the same. Hindi with the English mixed into it (Hinglish), English, Gujarati, Tamil and Telugu are also live in text to speech.

Pass the language

Send the code you expect the speaker to use. gu-IN and gu mean the same, in any case. When you leave it out, we transcribe Hindi. A code outside the ten, other than auto, is refused with 400 invalid_config.

Choose how Mira STT picks the language

If you know the caller’s language, pass it. A fixed language is the most accurate and the fastest. Use secondary_languages when callers switch between languages you know, such as Hindi and English, or Gujarati and Hindi. Use auto only when you don’t know the language. When an utterance switches to a different language, its final transcript can take a little longer to come back. Only that one final is slower.

Secondary languages

secondary_languages lists up to three more of the ten codes, next to an explicit language. It means “callers mostly speak language, but may switch to these”. Your language stays the default. An utterance moves to a secondary language only when Mira STT is confident it is in that language. The session remembers what it has heard, so a caller who switches is followed into the new language. Codes take the same forms as language (hi works too). A duplicate, or the main language repeated, is dropped. A code outside the ten, more than three languages, or secondary_languages with auto is refused with 400 invalid_config. English words inside Hindi or Gujarati need no secondary language (see below). Add en-IN when callers may switch to speaking English throughout. A voice agent’s secondary_languages reach Mira STT in the same way.

Automatic language identification

With language=auto, Mira STT works out the language of each utterance among the ten and remembers what it heard earlier in the session. unknown means the same, for clients written for Sarvam.

What to expect

  • Mira STT needs a little speech before it switches. A short turn such as “hello” or “haan” says little about the language, so the first few turns of a caller who speaks a secondary language can come back in your main language until Mira STT is sure.
  • Check language_probability before you act on a language. A low value, often on a turn of a word or two, means Mira STT was not sure.

The language in the answer

Every answer says which language Mira STT heard. When Mira STT picked the language itself, with auto or secondary_languages, it also says how sure it is: language_probability, from 0 to 1. A clip or session in the one language you named has no language_probability: Mira STT did not pick the language, so language is the one you sent. A segment with no words has none either.
HTTP, language=auto
WebSocket, language_code=auto

Change the language mid-session

On the socket, send config.update with language_code, secondary_languages or both. It applies from the next utterance; the utterance in progress finishes with the settings it started with:
"secondary_languages": "" clears the list. To move to auto from a session with secondary languages, clear them in the same message: {"event": "config.update", "language_code": "auto", "secondary_languages": ""}. On HTTP, each request carries its own language and secondary_languages.

English inside an Indian language

Indian speech mixes in English all the time. Pass the Indian language, and the English words in it come back in English, in Latin script, the way they were said. Nothing is translated, and the rest stays in the language’s own script:
hi-IN
gu-IN
English inside Hindi or Gujarati is part of that language, so you don’t need en-IN for it. Use en-IN when the speaker talks English throughout. Names are the exception. A brand or a name Mira STT has not met before often comes back in the language’s own script: “Zylora” as “ज़ायलोरा” on a Hindi call. List such names, in both spellings, in keyterms.

When to use offline transcription instead

Offline transcription is a separate service for recordings that already exist. Use it when you need speaker labels, timestamps across a long call, or recordings of up to two hours. It has its own auto, which detects the main language of the recording, and its own codes: hi, gu, en, mr, pa, bn, ta, te, kn, ml and ur. Its answer says which language was spoken in the recording and in each segment, with language_probability, whether you set the language or not. For one clip of up to two minutes, or live audio, use the speech-to-text API.

Ask for a language

If your callers speak a language that is not here, tell us which one.