Create a Language

Creates a language to use in a chatbot's communication scope.

Starting from IBM RPA 23.0.3, support for Interactive Voice Response (IVR) is removed from this command due to the removal of IVR. For more information, see Removed.

Command availability: IBM RPA SaaS and IBM RPA on premises

Description

This command returns a Language variable type that you can use as the default language in the chatbot's communication scope. To use it as default language:

  • Enter this variable in the Connect to Chatbot (botConnect).
  • Enter this variable in the Set Bot Language (setLanguage). In this case, it replaces the default language that is previously defined in the Connect to Chatbot (botConnect).

Extract commands in digital assistants script use the language that you defined on the Create a Language command and bound to the Connect to Chatbot to extract entities from text messages. For more information, see Define the bot's Language.

In addition, Interactive voice response (IVR) systems consider the language and voice defined in the speech engine to recognize and synthesize the message in a call with the user.

Script syntax

IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

createLanguage --culture(Culture) [--speech(SpeechEngine)] (Language)=value

Input parameter

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Language culture Required Culture The language.

See the culture parameter options.
Speech speech Optional Speech Engine Speech engine variable.

You can get the speech engine by using the following commands:

Create Amazon Speech Engine
Create Bing Speech Engine
Create Google Speech Engine
Create Nuance Speech Engine
Create Verbio Speech Engine
Watson Engine

Starting from IBM RPA 23.0.3, this parameter is removed.

culture parameter options

The following table displays the options available for the culture input parameter. The table shows the options available when working in Script mode and the equivalent label in the Designer mode.

Designer mode label Script mode name Description
en-US en-US Matches the English (United States) language.
pt-BR pt-BR Matches the Portuguese (Brazil) language.
pt-PT pt-PT Matches the Portuguese (Portugal) language.

Output parameter

Designer mode label Script mode name Accepted variable types Description
Culture value Language Returns the Language variable in the specified culture.

Example

The Create a Language command creates a language to use as default language for the bot's scope, while the Watson Engine defines the language and voice engine to the IVR's communication.

defVar --name speechEngine --type SpeechEngine
defVar --name cultureEN --type Language
// Defines the language as English (United States) and the bot's vocalization by using Watson's speech engine.
watsonEngine --culture "en-US" --voice "en-US_LisaVoice" speechEngine=value
// Create the langiage to use in the bot's communcation scope and bind the speech engine.
createLanguage --culture "en-US" --speech ${speechEngine} cultureEN=value
// Connect the IVR bot.
botConnect --type "Ivr" --language ${cultureEN} --autoanswer  --timeout "00:05:00"
	// Says "Hello, welcome!" on the IVR call.
	botSay --text "Hello, welcome!"
	// Disconnect the IVR bot.
botDisconnect