Skip to main content
Anam supports multilingual conversations, allowing your personas to understand and respond to users speaking in their native language. By configuring the transcription language, you ensure accurate speech recognition and better response times for non-English speakers.

How It Works

When a user speaks to your persona, their speech is transcribed using speech-to-text technology. If you do not set a language, the persona inherits your organization’s default transcription language. Organizations without a configured default use English. For non-English users, specifying the expected language can improve:
  • Transcription accuracy: The system correctly interprets words and phrases in the target language
  • Response latency: Optimized processing for the specified language reduces delays
The languageCode controls what language the system expects to hear from users. This is separate from the persona’s voice, which determines what language the persona speaks.

When to Configure Language

For many use cases, the default English setting works well—even when users speak other languages. The LLM can still understand the meaning of what’s said and respond appropriately. Setting a specific languageCode becomes important when:
  • You need exact transcription: In English mode, non-English speech may be translated to English in the transcript rather than preserved in the original language. If your application displays transcripts or the persona needs to see the exact words spoken, set the matching language code.
  • You’re building language-focused experiences: For language learning apps, pronunciation practice, or any use case where the specific words matter as much as their meaning.
  • You want optimized latency: Configuring the correct language reduces processing time for non-English speech.

Setting the Language Code

For a saved persona, open its Advanced settings in the Anam Lab and use Transcription Language. For an ephemeral persona, add languageCode to personaConfig when requesting a session token via POST /v1/auth/session-token:

Configuration Reference

string
A 2-character ISO 639-1 code (or the literal inherit sentinel) specifying the expected user speech language. Omit it, use inherit, an empty string, or null to use the organization default. If the organization has no configured default, Anam uses en (English).

Supported Languages

Anam supports 70+ languages for speech recognition. Common supported languages include:
Serving primarily non-English users? Contact Anam support to set your organization default. Personas using inherit pick up that language when their next session starts, while an explicit persona or session languageCode takes precedence.
Changing the organization default can make an inherited language incompatible with a persona’s saved STT provider. Anam does not block the organization-wide change. For affected sessions, it ignores the saved provider selection and uses the platform default provider so the session can still start. Set an explicit languageCode at the persona level if the provider must remain fixed.

Understanding Language Configuration

There are three settings to consider when building multilingual experiences:

Transcription Language (What Users Speak)

The languageCode field tells the speech recognition system what language to expect from users. Set this to match your users’ spoken language for accurate transcription.

Voice Language (What the Persona Speaks)

The voiceId determines the voice and language your persona uses when speaking. Select a voice that matches your target language from the GET /v1/voices endpoint or the Anam Lab.
For a fully localized experience, configure both the languageCode (for user speech recognition) and select an appropriate voiceId (for persona speech output).

Speech-to-Text Provider

The optional voiceDetectionOptions.sttProvider determines which provider transcribes user speech. Provider language support differs: anam supports every language listed above, while deepgram supports en, es, fr, de, hi, ru, pt, ja, it, and nl. The Lab prevents new explicit provider-language mismatches. The API also rejects an explicit unsupported pair. Inherited languages behave differently because the organization default can change after a persona is saved: an unsupported inherited pair falls back to the platform default provider at session start. See Voice Detection for provider configuration and restrictions.

Best Practices

Always set languageCode to match the language your users will speak. Mismatched settings result in poor transcription accuracy. If your German users speak German, set languageCode: "de".
Choose the expected language before the session starts. If your application supports multiple languages:
  • Create separate sessions with appropriate language codes for each user
  • Determine the user’s preferred language before starting the session
  • Consider using a language selection step in your onboarding flow
For the best multilingual experience:
  1. Set languageCode for accurate speech recognition
  2. Select a voiceId in the target language
  3. Write your systemPrompt in the target language or instruct the persona to respond in that language
If your application primarily serves users of one non-English language, contact Anam support to set an organization default. Benefits include:
  • Simplified integration without passing languageCode every time
  • No changes needed to existing integrations
  • Per-session languageCode still overrides the default when needed

SDK Usage

When using the JavaScript SDK with ephemeral personas, the languageCode field in your PersonaConfig is passed through when creating session tokens:
For a saved persona, set Transcription Language in its Advanced settings in the Anam Lab. Select Inherit from org default to resolve the language from the organization setting when each session starts.

Next Steps

Persona Configuration

Learn more about configuring personas

Prompting Guide

Write effective system prompts for multilingual personas

Authentication

Understand session token creation
Last modified on August 26, 2026