Amazon Web Services Feed
Creating a sophisticated conversational experience using Amazon Lex in Australian English
Amazon Lex is a service for building conversational interfaces into any application using voice and text. To build truly engaging conversational experiences, you need high quality speech recognition and natural language understanding that understands the intent of the customer accurately.
We are excited to announce that Amazon Lex now supports Australian English. With Australian English, you can deliver a robust and localized conversational experience that accurately understands the Australian dialect. You can also respond to users with natural sounding Amazon Polly Australian voices to provide a fully localized conversational experience.
This post shows how you can build a bot with Australian English support and use the pre-defined built-ins to deliver a superior experience to your users.
Building an Amazon Lex bot
This post uses the following conversation to model a bot:
User: I’d like to schedule an appointment for a dishwasher repair.
Agent: Sure, what city are you in?
User: Ballarat.
Agent: Got it. And what’s the serial number?
User: 1234.
Agent: Ok. For that model, I have technicians available next week. When would you prefer to have them visit?
User: Can I get someone on 4/9?
Agent: Sure. You are all set for September 4th.
User: Thanks!
The first step is to build an Amazon Lex bot with intents to manage appointments. The ScheduleAppointment
, ModifyAppointment
, and CancelAppointment
intents provide this capability. You can download a sample bot definition to follow along with this post.
Creating a bot in Australian English
For this post, you will create an Amazon Lex bot called AppointmentBot
. Alternatively, you can also import the sample bot directly and skip the bot creation process.
- Open the AWS console, and make sure you have selected the Asia Pacific (Sydney)/ap-southeast-2 region.
- Go to the Amazon Lex console. On the Bots tab, choose Create.
- Select Custom Bot.
- Enter the Bot name and select English (AU) as Language.
- Select the Output voice. The list of voices are specific to the language selected for the bot.
- Specify Sentiment analysis, Session timeout, and COPPA settings.
- Choose Create.
- Once the bot is created, create
ScheduleAppointment
,ModifyAppointment
, andCancelAppointment
intents for your bot by adding sample utterances and slot values. - Select Build.
At this point, you should have a working Lex bot.
Setting up an Amazon Connect flow
In this section, we deploy the bot in an Amazon Connect Interactive Voice Response (IVR).
Creating your Amazon Connect instance
In this first step, you create your Amazon Connect instance:
- On the AWS Management Console, choose Amazon Connect.
- If this is your first Amazon Connect instance, choose Get started; otherwise, choose Add an instance.
- For Identity management, choose Store users within Amazon Connect.
- Enter a URL prefix such as
test-instance-
############, where “############” is your current AWS account number. - Choose Next step.
- For Create an administrator, enter a name, password, and email address.
- Choose Next step.
- For Telephony Options, leave both call options selected by default.
- Choose Next step.
- For Data storage, choose Next step.
- Review the settings and choose Create instance.
- After your instance is created, choose Get started.
Associating your bot with your Amazon Connect instance
Now that you have an Amazon Connect instance, you can claim a phone number, create a contact flow, and integrate with the AppointmentBot
Lex bot you created in the prior step. First, associate your bot with your Amazon Connect instance:
- On the Amazon Connect console, open your instance by choosing the Instance Alias
- Choose Contact flows.
- From the drop-down list, choose
AppointmentBot
. If you don’t see the bot in the list, make sure you have selected the same Region you used when you created your Lex bot. - Choose + Add Lex Bot.
Configuring Amazon Connect to work with your bot
Now you can use your bot with Amazon Connect.
- On the Amazon Connect dashboard, for Step 1, Choose Begin.
- For your phone number, choose Australia for the country, Direct Dial or Toll Free, and choose a phone number.
- Choose Next.
- If you want to test your new phone number, try it on the next screen or choose Skip for now.
For this post, you can skip hours of operation, creating queues, and creating prompts. For more information on these features, see the Amazon Connect Administrator Guide.
- For Step 5, Create contact flows, choose View contact flows.
- Choose Create contact flow.
- Change the name of the contact flow to
Manage repairs
. - From the Set drop-down menu, drag a Set voice card to the contact flow canvas. Open the card and change the Language to “English (Australian)”, choose an available Voice, and choose Save.
- Drag a connector from the Entry point card to your new Set voice card.
- From the Interact drop-down menu, drag a Play prompt card to the contact flow canvas.
- In the Play prompt details, choose Text-to-speech or chat text.
- In the text box, enter
Hi. How can I help? You can schedule or change a repair appointment.
- Choose Save.
- Drag a connector from the Set voice card to your new Play prompt card.
- Drag a Get customer input card to the contact flow canvas.
- In the Get customer input details, choose Text-to-speech or chat text.
- In the text box, enter
What would you like to do?
- Choose Amazon Lex, and choose the
AppointmentBot
bot in the drop-down list. - Add each
AppointmentBot
intent to the contact flow:ScheduleAppointment
,ModifyAppointment
,CancelAppointment
, andDisconnect
. - Choose Save.
- Drag a connector from the Play prompt card to the Get customer input
- Drag a Play prompt card to the contact flow.
- Choose Text-to-speech or chat text.
- In the text box, enter
Is there anything else I can help you with?
- Choose Save.
- Drag connectors for each entry (except for Disconnect) in the Get customer input card to the new Play prompt card.
- Drag a connector from the new Play prompt card back to the Get customer input card.
- From the Terminate/Transfer drop-down menu, and drag a Disconnect/Hang up card to the contact flow.
- Drag a connector from the Disconnect entry in the Get customer input card to the Disconnect/Hang up card.
Your contact flow should look something like the following image.
- Choose Save to save your contact flow.
- Choose Publish to make your new contact flow available to your callers.
- Choose the Dashboard icon from the side menu.
- Choose Dashboard.
- Choose View phone numbers.
- Choose your phone number to edit it, and change the contact flow or IVR to the
Manage Repairs
contact flow you just created. Choose Save.
Your Amazon Connect instance is now configured to work with your Amazon Lex bot. Try calling the phone number to see how it works.
Conclusion
Conversational experiences are vastly improved when you understand your user’s accent and respond in a style familiar to them. With Australian English support on Amazon Lex, you can now build bots that are better at understanding the Australian English accent. You can also use pre-defined slots to capture local information such as names and cities. Australian English allows you deliver a robust and localized conversational experience to your users in the Australia region. Australian English is available at the same price, and in the same Regions, as US English. You can try Australian English via the console, the AWS Command Line Interface (AWS CLI), and the AWS SDKs. Start building your Aussie bot today!
About the Authors
Brian Yost is a Senior Consultant with the AWS Professional Services Conversational AI team. In his spare time, he enjoys mountain biking, home brewing, and tinkering with technology.
Anubhav Mishra is a Product Manager with AWS. He spends his time understanding customers and designing product experiences to address their business challenges.