Skip to content

Real-Time Translation Settings

Cognigy.AI supports integration with various real-time translation services, allowing you to automatically translate incoming text to the language of your flow and translate the flow output back to the user's language.

Before using this feature, you need to configure a machine translation provider. The choice of provider won't affect the configuration, but there may be differences in translation results and the list of supported languages.

Configure Translation Provider

  1. Open the Cognigy.AI interface.
  2. In the left-side menu, select an Agent.
  3. In the left-side Agent menu, select Manage > Settings.
  4. In the Translation settings section, select one of the following providers:

    • Translation Provider API Key โ€” enter your unique API key provided by Microsoft Translator. It's necessary for authentication and allows you to access translation services.
    • Request Retries โ€” specify how often Cognigy should attempt to call the translation provider if an error occurs during the initial request. For example, if you set it to 3, Cognigy will try three times before giving up on a translation request.
    • Request Timeout โ€” determine how long Cognigy should wait for a response from the translation provider after making a request, measured in milliseconds. If the provider doesn't respond within this time frame, it's considered a timeout.
    • Sentence Cache Expiry Timeout โ€” determine how long translations should be kept in the cache before they are considered outdated and removed. The default value is 84,600 seconds, which is equivalent to 1 day. You can set it to 0 for no caching.
    • Custom API Base URL โ€” this setting is optional. If you have specific requirements or need to connect to a custom instance of the Microsoft Translator API different from the default one https://api.cognitive.microsofttranslator.com/, you can use this field to specify a custom base URL. It allows you to define the URL, including the protocol scheme, for example https://api-eur.cognitive.microsofttranslator.com, to tailor the API connection to your needs.
    • Custom Subscription Region โ€” this setting is optional. It represents the location or region of your Azure MS Translator resource. You may need to use this field when calling this API, especially if you have specified a specific region in your Azure account.
    • Translation Provider API Key โ€” enter your unique API key provided by Google Cloud Translation. It's necessary for authentication and allows you to access translation services.
    • Request Retries โ€” specify how often Cognigy should attempt to call the translation provider if an error occurs during the initial request. For example, if you set it to 3, Cognigy will try three times before giving up on a translation request.
    • Request Timeout โ€” determine how long Cognigy should wait for a response from the translation provider after making a request, measured in milliseconds. If the provider doesn't respond within this time frame, it's considered a timeout.
    • Sentence Cache Expiry Timeout โ€” determine how long translations should be kept in the cache before they are considered outdated and removed. The default value is 84,600 seconds, which is equivalent to 1 day. You can set it to 0 for no caching.
    • Translation Provider API Key โ€” enter your unique API key provided by DeepL Translate Pro. It's necessary for authentication and allows you to access translation services.
    • Request Retries โ€” specify how often Cognigy should attempt to call the translation provider if an error occurs during the initial request. For example, if you set it to 3, Cognigy will try three times before giving up on a translation request.
    • Request Timeout โ€” determine how long Cognigy should wait for a response from the translation provider after making a request, measured in milliseconds. If the provider doesn't respond within this time frame, it's considered a timeout.
    • Sentence Cache Expiry Timeout โ€” determine how long translations should be kept in the cache before they are considered outdated and removed. The default value is 84,600 seconds, which is equivalent to 1 day. You can set it to 0 for no caching.
    • Custom API Base URL โ€” this setting is optional. If you have specific requirements or need to connect to a custom instance of the DeepL Translate Pro API, you can use this field to specify a custom base URL. It allows you to define the URL, including the protocol scheme, for example https://api-free.deepl.com/, to tailor the API connection to your needs.
  5. Click Save.

Configure Real-Time Translation Settings

Version badge

After selecting a translation provider, you can now configure translation parameters in the Endpoint configuration.

  1. Open the Cognigy.AI interface.
  2. In the left-side menu, select an Agent.
  3. In the left-side Agent menu, select Deploy > Endpoints.
  4. Select an existing Endpoint or create a new one.
  5. In the Endpoint settings, go to the Real-time Translation Settings section. In the section, the provider you configured in the Translation Provider Settings configuration will be automatically selected.
  6. Configure the settings based on your provider:
Parameter Description Providers
Enable Translation Indicates whether translation is enabled for the Endpoint. Microsoft, Google, DeepL Translate Pro
User Input Language Determines a language of the user inputs. If you selected the Auto-Detect option, refer to the Auto-Detect User Inputs section. Microsoft, Google, DeepL Translate Pro
Flow Language Determines a language of the Flow outputs. Microsoft, Google, DeepL Translate Pro
Set user input language on execution count If the input language is set to Auto-Detect, it will be fixed to its current value on this execution count. The maximum value is 5 user inputs. These settings apply to every language supported by Cognigy.AI. Microsoft, Google, DeepL Translate Pro
Glossary ID Output Determines the Glossary ID for the virtual agent's output translations. To ensure that the translations work correctly, the source and target languages of the Glossary must match the selected language in the Flow Language and User Input Language fields. DeepL Translate Pro
Glossary ID Input Determines the Glossary ID for user input translations. To ensure that the translations work correctly, the source and target languages of the Glossary must match the selected language in the Flow Language and User Input Language fields. If Auto-Detect is chosen in the User Input Language field, the Glossary will not be used for input translations. DeepL Translate Pro
Formality Determines a level of formality in the translated text. The setting applies to specific target languages such as DE (German), FR (French), IT (Italian), ES (Spanish), NL (Dutch), PL (Polish), PT-BR, and PT-PT (Portuguese), JA (Japanese), and RU (Russian). By selecting the appropriate formality level, you can tailor the translation to suit your communication needs better, whether for formal or informal contexts. DeepL Translate Pro
No-Translation Marker Prevents the translation of text that the AI Agent sends to the user. By default, the text enclosed in the ** no-translation marker will not be translated. For example, if you write Willkommen, **Moin**! in a Say Node of your Flow and the detected language is English, the AI Agent will send to the user Welcome, Moin! because Moin will not be translated to Good Morning. Microsoft, Google, DeepL Translate Pro
Always remove No-Translation Markers Determines whether to remove No-Translation Markers, even when translation is disabled Microsoft, Google, DeepL Translate Pro
Prevent payloads from being translated Prevents the translation of user inputs based on payloads. Microsoft, Google, DeepL Translate Pro

Auto-Detect User Inputs

In the settings, you have the option to select a predefined language or choose Auto-Detect as the user input language.

When automatic language detection for user inputs is enabled, the system determines the language based on the number of user inputs. To configure the number of user inputs, set the Set user input language on execution count parameter to your desired value.

In the example below, if the Set user input language on execution count setting is configured to 1, a virtual agent will use the language of the user's first input for all subsequent interactions.

Auto-detected user input is German

More Information