Skip to main content

Overview

You can tell the server which language a session should use by passing a BCP-47 code as preferred_language when you open the session.
Language-keyed personas currently apply to voice sessions only. If a kiosk has language_personas configured, a voice session picks the matching persona for preferred_language (falling back to the kiosk’s default persona if no match). A text session always uses the kiosk’s single default persona, regardless of preferred_language — language-persona selection is not yet wired into the text turn pipeline.
preferred_language is echoed back as detected_language in the session-open response — the server does not perform real language detection today.

Session open contract

POST /v1/sessions
preferred_language is optional — omit it entirely to use the kiosk’s default persona/language. Response (201):
A disclosure_text field (an EU AI Act disclosure string) is planned for a future release but is not populated by the server today — it is always omitted from the response. The SDK and widget code below that reads disclosureText / disclosure_text is forward-compatible and currently a no-op: it will start rendering the moment the backend populates the field, but don’t build a launch-blocking UI around it yet.

JavaScript / TypeScript SDK

Widget — automatic language selector

When languageSelector.enabled is true, the widget shows language buttons before the first message is sent. The chosen language is passed to openSession automatically and the disclosure banner (if any) is shown immediately after the session opens.

React

Vue


Python SDK


Go SDK


.NET SDK


C SDK

Pass NULL for config to use all defaults (text mode, no language preference). Pass NULL for the result parameter if you do not need the detected language or disclosure text.

WordPress plugin

In the admin panel, go to Settings → Humain Kiosk → Language and choose one of: The AI disclosure checkbox controls whether the disclosure banner is shown to visitors. The text itself is configured in your kiosk settings on the Humain admin panel — note disclosure_text is not yet populated by the server (see the note above), so this banner will not render until that ships.

Admin panel — configuring language personas

A kiosk can define a language persona per BCP-47 code under Kiosk → Personas:
  1. Open Kiosk → Personas and click Add persona.
  2. Set the Language field to a BCP-47 code (e.g. tr, ar, de).
  3. Write the system prompt in that language, or use the same prompt as the default persona.
  4. Save.
This only affects voice sessions. When a voice session opens with preferred_language set, the server looks up language_personas[preferred_language] and uses it if present, otherwise falls back to the kiosk’s default persona. A text session ignores language_personas entirely and always uses the kiosk’s default persona — sending preferred_language: "tr" on a text session does not change which persona is used, only the (currently cosmetic) detected_language echoed back.
With Gemini Live, you do not need to configure per-language STT or TTS voices. The model handles all 90+ supported languages natively — configuring language_personas only changes which system prompt is used, not the model’s ability to speak the language.

Gemini Live and language support

Voice sessions run on Gemini Live, which natively supports 90+ languages from a single model — no per-language STT model or TTS voice configuration is needed. The model responds in whatever language the user speaks, independent of persona selection; preferred_language and language_personas only control which system prompt is loaded (see the warning above). Text sessions use the same LLM for every language and handle multilingual input without any server-side configuration — but again, without a way to select a different persona per language today.

Behaviour reference

The preferred_language field has no effect on which persona a text session uses. detected_language is always just an echo of what you sent, not a real detection result.