> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> multilingual STT) — or Pulse 2.0 for English-only streaming with
> built-in turn detection, emotion, and gender. Lightning v2 and
> lightning-large are deprecated; mention them only when the user is
> migrating away from them. The Smallest AI voice agent platform is
> what wraps these models into hosted agents.

# STT: automatic language detection with `language=auto` (beta)

> Pulse pre-recorded STT can detect the spoken language and route to the right model, in the US region.

Pulse pre-recorded STT accepts `language=auto`. The spoken language is detected from a few short samples of the audio, and the file is transcribed with that language's model.

The response adds `detected_language`, `language_confidence` and `mixed_language_detected`. One language is chosen per file; if a file mixes languages served by different models, the dominant one is used and `mixed_language_detected` is `true`.

When detection can't give a reliable answer, the request fails with an error rather than a transcript in the wrong language: `NO_SPEECH_DETECTED`, `LANGUAGE_DETECTION_LOW_CONFIDENCE` (also returned for audio with no identifiable language, such as music or noise), `DETECTED_LANGUAGE_NOT_SUPPORTED`, or `LANGUAGE_NOT_ENABLED_IN_REGION` with the detected language. If language detection itself is temporarily unavailable, the request returns `503 LID_UNAVAILABLE`. On any of these errors, retry with `language` set explicitly.

Endpoint: `POST https://api.us.smallest.ai/waves/v1/stt/?model=pulse&language=auto`. US region only during the beta; not available on `pulse-pro` or streaming.

## Limitations during the beta

* **Short clips are less reliable.** Detection works best with at least about 10 seconds of speech. On clips of a few seconds it is more often wrong or returns `LANGUAGE_DETECTION_LOW_CONFIDENCE`. If you know the language of short clips, pass it explicitly.
* **Detection adds a step before transcription.** It runs before the file is queued, so `auto` requests take slightly longer than the same request with an explicit `language`.