{"id":266,"date":"2020-09-24T19:51:45","date_gmt":"2020-09-24T19:51:45","guid":{"rendered":"https:\/\/machine-learning.webcloning.com\/2020\/09\/24\/expanding-amazon-lex-conversational-experiences-with-us-spanish-and-british-english\/"},"modified":"2020-09-24T19:51:45","modified_gmt":"2020-09-24T19:51:45","slug":"expanding-amazon-lex-conversational-experiences-with-us-spanish-and-british-english","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2020\/09\/24\/expanding-amazon-lex-conversational-experiences-with-us-spanish-and-british-english\/","title":{"rendered":"Expanding Amazon Lex conversational experiences with US Spanish and British English"},"content":{"rendered":"<div id=\"\">\n<p><a href=\"http:\/\/aws.amazon.com\/lex\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Lex<\/a> provides the power of automatic speech recognition (ASR) for converting speech to text, along with natural language understanding (NLU) for recognizing user intents. This combination allows you to develop sophisticated conversational interfaces using both voice and text for <a href=\"https:\/\/aws.amazon.com\/lex\/\" target=\"_blank\" rel=\"noopener noreferrer\">chatbots<\/a>, IVR bots, and voicebots.<\/p>\n<p>This week, we\u2019re announcing Amazon Lex support for British English and US Spanish. With British English, your conversational bots can be localized to understand the British English accent, while delivering responses in <a href=\"https:\/\/aws.amazon.com\/polly\/\">Amazon Polly<\/a> voices designed to sound like UK English speakers. Brilliant!<\/p>\n<p>With support for US Spanish, you can develop applications for the second-most widely spoken language in the United States. Amazon Lex can now accurately recognize written and spoken Spanish, while providing responses using Amazon Polly\u2019s natural sounding US Spanish voices. Listo!<\/p>\n<p>In this post, we consider a hypothetical appliance manufacturer in the United States. Customers calling into their service center to schedule or change a repair appointment may prefer to speak in English or Spanish. The application for this use case allows callers to select their preferred language by saying \u201cEnglish\u201d or \u201cEspa\u00f1ol\u201d when prompted. You want to provide them with the best customer service experience, no matter whether it is their washing machine or their lavadora that needs repair.<\/p>\n<p>We show you how to create an <a href=\"http:\/\/aws.amazon.com\/connect\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Connect<\/a> call center experience that supports both US English and US Spanish. Customers can schedule, change, and cancel appointments, using a fully automated solution that converses with them in their preferred language.<\/p>\n<h2>Building a multi-language conversational experience<\/h2>\n<p>This post uses the following sample conversations:<\/p>\n<p><strong>Agent:<\/strong> Thank you for calling. To continue in English, say \u201cEnglish,\u201d for Spanish, say \u201cEspa\u00f1ol.\u201d<\/p>\n<p><em><u>US English<\/u><\/em><\/p>\n<p><strong>Agent:<\/strong> I can schedule or change a repair appointment. How can I help?<\/p>\n<p><strong>User:<\/strong> I want to get my dishwasher fixed.<\/p>\n<p><strong>Agent:<\/strong> What city are you in?<\/p>\n<p><strong>User:<\/strong> Philadelphia<\/p>\n<p><strong>Agent:<\/strong> I have technicians available next week. When would you prefer to have them visit?<\/p>\n<p><strong>User:<\/strong> September 24th at noon<\/p>\n<p><strong>Agent:<\/strong> OK, you are all set for your dishwasher repair in Philadelphia on the 24th of September at noon.<\/p>\n<p><em><u>US Spanish <\/u><\/em><\/p>\n<p><strong>Agent:<\/strong> Puede reservar o cambiar una cita de reparaci\u00f3n. \u00bfC\u00f3mo puedo ayudar?<\/p>\n<p><strong>User:<\/strong> Me gustaria programar una cita<\/p>\n<p><strong>Agent:<\/strong> Para qu\u00e9 tipo de aparato?<\/p>\n<p><strong>User:<\/strong> Refrigerador<\/p>\n<p><strong>Agent:<\/strong> En que ciudad estas?<\/p>\n<p><strong>User:<\/strong> Brooklyn<\/p>\n<p><strong>Agent:<\/strong> En que fecha te gustaria que vinieran?<\/p>\n<p><strong>User:<\/strong> 24 de Septiembre<\/p>\n<p><strong>Agent:<\/strong> Bien, ya est\u00e1 todo listo para la reparaci\u00f3n de su refrigerador en 24 de Septiembre, 2020.<\/p>\n<p>To support these conversation models, you need to create Lex bots with relevant user intents. In this post, we create intents for <code>ScheduleAppointment<\/code>, <code>ModifyAppointment<\/code>, and <code>CancelAppointment<\/code> (and in Spanish, <code>ReservarCita<\/code>, <code>ModificarCita<\/code>, <code>CancelarCita<\/code>).<\/p>\n<h2>Deploying the sample Lex bots<\/h2>\n<p>To create the sample bots, perform the following steps. For this post, you create two Amazon Lex bots: <code>AppointmentBot_enUS<\/code> for US English, and <code>AppointmentBot_esUS<\/code> for US Spanish. To follow along with this post, you can create these Lex bots yourself on the Amazon Lex console, or import them directly.<\/p>\n<ol>\n<li>To import the bots, download the <a href=\"https:\/\/aws-ml-blog.s3.amazonaws.com\/artifacts\/lex-enUK-esUS\/AppointmentBot_enUS.zip\" target=\"_blank\" rel=\"noopener noreferrer\">US English bot<\/a> and the <a href=\"https:\/\/aws-ml-blog.s3.amazonaws.com\/artifacts\/lex-enUK-esUS\/AppointmentBot_esUS.zip\" target=\"_blank\" rel=\"noopener noreferrer\">US Spanish bot<\/a>\n<\/li>\n<li>On the Amazon Lex console, choose<\/li>\n<li>Select the <strong>zip<\/strong> that you downloaded, and choose <strong>Import<\/strong>.<\/li>\n<li>When the import process is complete, choose <strong>AppointmentBot_enUS<\/strong>, and choose<\/li>\n<li>When the build it complete, go back to the Amazon Lex console main window, and choose <strong>Import<\/strong>.<\/li>\n<li>Select the <strong>zip<\/strong> that you downloaded, and choose <strong>Import<\/strong>.<\/li>\n<li>When the import process is complete, choose <strong>AppointmentBot_esUS<\/strong>, and choose<\/li>\n<\/ol>\n<p>At this point, you should have two working Lex bots: one for US English, and one for US Spanish.<\/p>\n<h3>Creating your Amazon Connect instance<\/h3>\n<p>In this section, we integrate the bots with an Amazon Connect cloud-based call center instance. The first step is to create the Amazon Connect instance:<\/p>\n<ol>\n<li>On the <a href=\"http:\/\/aws.amazon.com\/console\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Management Console<\/a>, choose <strong>Amazon Connect<\/strong>.<\/li>\n<li>If this is your first Amazon Connect instance, choose <strong>Get started<\/strong>; otherwise, choose <strong>Add an instance<\/strong>.<\/li>\n<li>For <strong>Identity management<\/strong>, choose <strong>Store users within Amazon Connect<\/strong>.<\/li>\n<li>Enter a URL prefix, such as <code>appointment-bot-############<\/code>, where ############ is your current AWS account number.<\/li>\n<li>Choose <strong>Next step<\/strong>.<\/li>\n<li>For <strong>Create an administrator<\/strong>, enter a name, password, and email address.<\/li>\n<li>Choose <strong>Next step<\/strong>.<\/li>\n<li>For <strong>Telephony Options<\/strong>, leave both call options selected by default.<\/li>\n<li>Choose<strong> Next step<\/strong>.<\/li>\n<li>For <strong>Data storage<\/strong>, choose <strong>Next step<\/strong>.<\/li>\n<li>Review the settings and choose <strong>Create instance<\/strong>.<\/li>\n<\/ol>\n<h3>Associating your bots with your Amazon Connect instance<\/h3>\n<p>Now that you have an Amazon Connect instance, you can claim a phone number, create a contact flow, and integrate your contact flow with the two Lex bots you created in the prior step. First, associate your bots with your Amazon Connect instance:<\/p>\n<ol>\n<li>On the Amazon Connect console, open your instance by choosing the <strong>Instance Alias<\/strong>\n<\/li>\n<li>Choose <strong>Contact flows<\/strong>.<\/li>\n<li>From the drop-down list, choose <strong>AppointmentBot_enUS<\/strong>. If you don\u2019t see the bot in the list, make sure you have selected the same Region you used when you created your Lex bot.<\/li>\n<li>Choose <strong>+ Add Lex Bot<\/strong>.<\/li>\n<li>From the drop-down list, choose <strong>AppointmentBot_esUS<\/strong> and choose <strong>+ Add Lex Bot<\/strong>.<\/li>\n<\/ol>\n<h3>Configuring Amazon Connect to work with your bot<\/h3>\n<p>Now you can use your bots with Amazon Connect. First, claim a phone number for your Amazon Connect instance:<\/p>\n<ol>\n<li>On the Amazon Connect console, choose <strong>Overview<\/strong>.<\/li>\n<li>Choose the <strong>Amazon Connect<\/strong>\n<\/li>\n<li>Choose the <strong>Login URL<\/strong> link, and enter the user name and password you specified earlier.<\/li>\n<li>On the Amazon Connect console, for <strong>Step 1<\/strong>, Choose <strong>Begin<\/strong>.<\/li>\n<li>For your phone number, choose a country, Direct Dial or Toll Free, and a phone number.<\/li>\n<li>Choose <strong>Next<\/strong>.<\/li>\n<li>If you want to test your new phone number, try it on the next screen or choose <strong>Skip for now<\/strong>.<\/li>\n<\/ol>\n<p>For this post, you can skip the hours of operation, creating queues, and creating prompts. For more information on these features, see the <a href=\"https:\/\/docs.aws.amazon.com\/connect\/latest\/adminguide\/what-is-amazon-connect.html\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Connect Administrator Guide<\/a>. Now let\u2019s import the contact flow.<\/p>\n<ol start=\"8\">\n<li>Download and unzip the sample Amazon Connect contact flow for this post: <a href=\"https:\/\/aws-ml-blog.s3.amazonaws.com\/artifacts\/lex-enUK-esUS\/manage_repairs.zip\" target=\"_blank\" rel=\"noopener noreferrer\">manage_repairs.zip<\/a>.<\/li>\n<li>On the Amazon Connect console, go to <strong>Step 5<\/strong>, <strong>Create contact flows<\/strong>, choose <strong>View contact flows<\/strong>.<\/li>\n<li>Choose <strong>Create contact flow<\/strong>.<\/li>\n<li>From the drop-down at the top right side of the page, choose <strong>Import flow (beta)<\/strong>.<\/li>\n<li>Choose <strong>Select<\/strong> and select the <code>manage-repairs.json<\/code> file you downloaded, and select <strong>Import<\/strong>.<\/li>\n<li>Choose <strong>Save<\/strong>, and then <strong>Publish<\/strong>.<\/li>\n<\/ol>\n<p>Your contact flow should look like the following screenshot.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-16183 size-full\" title=\"Contact flow\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2020\/09\/22\/1-Chart.jpg\" alt=\"\" width=\"900\" height=\"668\"><\/p>\n<ol start=\"14\">\n<li>Choose the <strong>Routing<\/strong> icon from the side menu, and choose <strong>Phone numbers<\/strong>.<\/li>\n<li>Choose your phone number to edit it, and change the contact flow or IVR to the <code>Manage Repairs<\/code> contact flow you just created.<\/li>\n<li>Choose <strong>Save<\/strong>.<\/li>\n<\/ol>\n<p>Your Amazon Connect instance is now configured to work with your Amazon Lex bots. Try calling the phone number to see how it works!<\/p>\n<h2>Conclusion<\/h2>\n<p>With the addition of British English and US Spanish language support, along with US English and Australian English, Amazon Lex allows you to create bots that can converse with users in their native language. You can combine Amazon Lex with Amazon Connect to create streamlined, multi-language call center user experiences in minutes. The additional language support in Amazon Lex is available at the same price, and in the same Regions, as US English. You can try these languages via the console, the <a href=\"http:\/\/aws.amazon.com\/cli\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Command Line Interface<\/a> (AWS CLI), and the AWS SDKs.<\/p>\n<hr>\n<h3>About the Authors<\/h3>\n<p><strong><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-16190 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2020\/09\/23\/ClaireMitchell.jpg\" alt=\"\" width=\"100\" height=\"133\">Claire Mitchell <\/strong>is a Design Consultant with the AWS Professional Services Conversational AI team. Occasionally she spends time exploring speculative design practices, textiles, and playing the drums.<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p><strong><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-16185 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2020\/09\/22\/brian-yost-100.jpg\" alt=\"\" width=\"100\" height=\"134\"> Brian Yost<\/strong> 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.<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p><strong><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-16186 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2020\/09\/22\/harshal_pimpalkhute_100.jpg\" alt=\"\" width=\"100\" height=\"109\"><\/strong>As a Product Manager on the Amazon Lex team, <strong>Harshal Pimpalkhute<\/strong> spends his time trying to get machines to engage (nicely) with humans.<\/p>\n<p>\u00a0<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/aws.amazon.com\/blogs\/machine-learning\/expanding-amazon-lex-conversational-experiences-with-us-spanish-and-british-english\/<\/p>\n","protected":false},"author":0,"featured_media":267,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/266"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/267"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}