New! OCI Translation Services supported in Oracle Digital Assistant

black and white book browse dictionary
Photo by Snapwire on Pexels.com

From ODA release 23.04, you can now use OCI Language as a translation service for your skills and digital assistants. This enables you to use a wide variety of languages in your digital assistants without exposing conversation text to third-party translation services

Setup the Translation Service

Just like the existing supported translation services we need to add the new OCI service.

OCI now appears in the drop-down for the service type. The only requirement is:

To use OCI Language as a translation service, you need to subscribe to the service and create permissions for Digital Assistant to access it. See Policies for OCI Language.

Create the Skill

When creating the skill we need to choose our Primary language as one from the list under Translation Service. In the below case, English is the Primary language and others will be translated.

Attention! Doing this won’t activate the translation automatically. We need to go to the Skill configurations and pick up one of the configured Translation Services.

In the same Configurations menu, we can choose which messages to translate (Input/Output) – more to that in a bit. For this particular demo, only input messages will be translated.

The Skill

To demonstrate this at work I create a very simple Skill with a couple of intents, one of them being the Greeting intent which is of type answer, so no need for dialog flow.

This Greeting intent has utterances in English (which is the primary language), so things like Hello, Hi, and Good morning will trigger it.

This means that I can greet this Skill in any of the supported (OCI Translation) languages!

The resource bundles, always remember the resource bundles!

A translation service has the ability to translate incoming messages and outgoing messages as well, however, we strongly advise (see the bold, it means it’s important) not to use the translation for output messages. In doing so, you lose control of what is being passed to the user.

Best practices say that we should add the output messages for the different languages in the resource bundles.

Ok, let’s bring all of this together – a simple greeting in any language that is not English, will be translated into English.

For example, Bom dia is Portuguese for Good morning. That input will be translated into English, which will trigger the Greeting intent, and will pick up the appropriate answer from the resource bundle, the one that matches the input language. Quite a simple approach, but yet, one that gives us full control of the output.

The same example as above, but now in Finish.

Translation services have been available for some time, but the introduction of OCI Translation marks a significant improvement. OCI Translation empowers users to handle translation tasks internally without the need to depend on third-party services.

Article published together with the Oracle Digital Assistant Blog