Dialogue system integration using AWS Polly for TTS functionality.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lakshman
Posts: 7
Joined: Fri Feb 25, 2022 3:38 am

Dialogue system integration using AWS Polly for TTS functionality.

Post by lakshman »

Hello Tony,

Right now we have created a dialogue system for an application where NPC's guide the player and the player has minimum inputs like name and email. Our concern is can we integrate AWS Polly service of TTS in dialogue system. Does the asset support aws polly integration? Because in documentation AWS polly was not listed in 3rd party integration. If it's possible to implement can you please suggest/provide any reference video or demo scene. The Dialogue UI prefab which we are using is SMS dialogue UI.

Thanks,
Lakshman
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue system integration using AWS Polly for TTS functionality.

Post by Tony Li »

Hi,

The Dialogue System doesn't provide a no-scripting integration for AWS Polly. You can use a setup similar to these examples for Wit.ai, Windows Speech Recognition, and Google Cloud Speech-To-Text.
lakshman
Posts: 7
Joined: Fri Feb 25, 2022 3:38 am

Re: Dialogue system integration using AWS Polly for TTS functionality.

Post by lakshman »

Hi Tony,

Thank you for the suggestion. We will look into it.
But I have one more question/doubt, as you said the Dialogue System doesn't provide an integration for AWS Polly. Can we use AWS services like DynamoDB to store and retrieve the input data from the user.

Example : NPC will ask for the user's email ID, first and last name one by one when the appropriate conversation is happening. Now we need to store the inputs from the user/player to DynamoDB. Is it possible to achieve it?
If yes please guide me in the right direction or demo scene will be more helpful :D .

Thank you,
Lakshman
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue system integration using AWS Polly for TTS functionality.

Post by Tony Li »

Hi,

Yes. To do that, I recommend using a custom sequencer command or C# method registered with Lua. For example, the conversation might be structured like:
  • Dialogue Text: "What is your name?"
  • Sequence: TextInput(Text Field UI, Name:, userName)
|
v
  • Dialogue Text: "Nice to meet you, [var=userName]."
  • Script: StoreString("User Name", Variable["userName"])
Note: The example above also uses the built-in TextInput() sequencer command.

It also assumes you've written a C# method named StoreString(string fieldName, string fieldValue) that stores a field value in a remote database and registered it with Lua.

Side note: For a more robust version of the example above, you'll probably want to check for blank input or disallowed input and loop back to the prompt if the input is not valid.
Post Reply