# Language detection

`language_config` tells the API which language to transcribe:

| `language_config` | effect |
|---|---|
| `{}`, or `languages: []` | the language is detected |
| `{"languages": ["fr"]}` | the session is transcribed in French |
| `{"languages": ["en", "fr"]}` | the first language only, English |
| `{"languages": ["en", "fr"], "code_switching": true}` | the language is detected, among English and French |

```json
{ "model": "solaria-3", "language_config": { "languages": ["fr"] } }
```

Every utterance carries its `language`, and the session's result lists the languages heard
(`result.transcription.languages`).

Setting the language when you know it gives faster and more accurate transcripts than detecting it, especially at
the start of a session.

Detection works with `solaria-3` and `solaria-1`. `trantoria-1` needs the language set
([Supported languages](/languages/supported-languages/)).

## Several languages in one session

When speakers may use several languages, list them and turn on [code switching](/languages/code-switching/).
