Discussions

Ask a Question
Back to All

How to implement language translation?

I am using interactive avatar. I have an option to choose different language while starting a session.

I am passing the language code for French in this code:

const sessionData = await avatar.createStartAvatar({
                avatarName: avatarName,
                quality: "high",
                language: "fr-CA",
                voiceId: "a98fff860388447ebe046f8a9fda5750"
            });

I am passing a welcome note in avatar.speak()

const welcomeMessage = "Hi There! Welcome! How can I assist you?";
await avatar.speak({
  text: welcomeMessage,
  taskType: TaskType.REPEAT,
  taskMode: TaskMode.SYNC,
});

I need my avatar to speak this welcome message in French language.

For that am I need to translate and then pass to speak() method?

If so, then what is the use of passing the language in createStartAvatar()?

Is there any way to auto-translate the conversations?