Virbe Documentation

Detect Text Language

Analyzes the user's text input and identifies its language, making the detected language available to downstream nodes.

The Detect Text Language node analyzes the content of the user's current text message and identifies its language. After this node runs, the detected language is available as context for downstream nodes and can trigger the conversation-language-change signal if it differs from the current active language.

Available in: Handlers – specifically designed for use in the On User Input Handler.

When to Use

Place this node in the On User Input Handler to ensure every incoming message has its language identified before any flow logic runs. This is the standard way to enable multilingual virtual beings.

How It Works

The node uses language detection on the raw text of the user's message. If the detected language is different from the currently active language, the conversation-language-change signal fires, which in turn triggers the On Language Change Handler.

If the detected language matches the active language, no signal is fired and processing continues normally.

Typical Placement

Text Handler Entry
    │
    └── On User Input ──► Detect Text Language ──► Continue Processing

Notes

  • Language detection works best on messages of more than a few words. Very short messages (e.g., "OK", "Yes") may not provide enough signal for reliable detection.
  • The detected language follows the BCP-47 language tag format (e.g., en-US, pl-PL, de-DE).
  • For the detected language to result in a full language switch (including speech), it must be configured in both the STT engine (Configurations → Speech-to-Text) and the Persona's voice list.

On this page