Language detection
This page is for ?model=pulse. Pulse 2.0 (?model=pulse-2) is English-only and doesn’t support language detection or regional aggregators.
Enabling language detection
Set the language query parameter to a regional aggregator when calling the API. Pulse will auto-detect the spoken language across the codes covered by that aggregator. Available aggregators differ by mode:
When you already know the source language, pass the explicit code (en, hi, es, etc.) for the best accuracy. For unknown European audio on pre-recorded, use multi-eu. For Indian audio, use the table below.
Which value to use for Indian languages
indic is streaming only and served from the India region (wss://api.smallest.ai). On wss://api.us.smallest.ai, the server sends an error and closes the connection:
For the exact codes inside each aggregator + region notes, see the Pulse model card - the single source of truth for which languages are supported on streaming vs batch.
Pre-Recorded API
Real-Time WebSocket API
Output format & field of interest
When language detection is enabled, the transcription (or transcript for realtime), words, and utterances arrays are emitted in the detected language. The response includes a language field with the detected primary language code, and a languages array (in realtime responses where is_final=true) listing all detected languages. Persist the detected locale in your app by storing the language parameter you supplied (for auditing) and by inspecting downstream metadata such as subtitles or captions that inherit the localized transcript.
Sample response
Pre-Recorded API Response
Real-Time WebSocket API Response
Real-Time response with indic
With language=indic, each final transcript carries the language that was detected for that utterance, so one session can return different languages. This caller asks a question in Hindi mixed with English, then switches to Tamil. These are the two final messages from the same session:
Use language as the main language of the utterance. languages lists every language heard in it, so Hindi with English words returns both hi and en. English words inside Hindi speech stay in Roman script.
The language field is only returned when is_final=true in real-time API responses. The languages array lists all languages detected in the audio and is also only included when is_final=true.