Book Image

Hands-On Chatbot Development with Alexa Skills and Amazon Lex

By : Sam Williams
Book Image

Hands-On Chatbot Development with Alexa Skills and Amazon Lex

By: Sam Williams

Overview of this book

Have you ever wondered how Alexa apps are made, how voice-enabled technologies work, or how chatbots function? And why tech giants such as Amazon and Google are investing in voice technologies? A better question is: why should I start developing on these platforms? Hands-On Chatbot Development with Alexa Skills and Amazon Lex covers all features of the Alexa Skills kit with real-world examples that help you develop skills to integrate Echo and chatbots into Facebook, Slack, and Twilio with the Amazon Lex platform. The book starts with teaching you how to set up your local environment and AWS CLI so that you can automate the process of uploading AWS Lambda from your local machine. You will then learn to develop Alexa Skills and Lex chatbots using Lambda functions to control functionality. Once you’ve come to grips with this, you will learn to create increasingly complex chatbots, integrate Amazon S3, and change the way Alexa talks to the user. In the concluding chapters, we shift our focus to Amazon Lex and messaging chatbots. We will explore Alexa, learn about DynamoDB databases, and add cards to user conversations. By the end of this book, you will have explored a full set of technologies that will enable you to create your own voice and messaging chatbots using Amazon.
Table of Contents (13 chapters)

Amazon Alexa and Lex

Alexa and Lex are a pair of tools built by Amazon to change the way that users interact with technology. They are platforms that allow developers to create immensely powerful conversational interfaces without having to study deep learning, natural language processing, or speech recognition.

They are part of the Amazon Web Services (AWS) group and therefore work brilliantly alongside the rest of the services, making the development process smoother and more consistent.

The main difference between Alexa and Lex is that the Alexa platform allows developers to create skills for Alexa-enabled devices, whereas Lex allows developers to create generic text or voice-based chatbots.

Amazon Alexa

Amazon Alexa is a voice-based chatbot that is the brains behind the Echo family of products from Amazon. Users can customize their Echo experience by adding skills to their Alexa account in a similar way to how you add apps onto a smartphone. These skills can be downloaded from the Alexa Skills Store and there are thousands to choose from.

Similar to apps, each of these skills has been designed to perform a single task, whether that's to talk you through a recipe to cook, guide you through your morning workout, or just to tell you jokes.

Alexa was released in November 2014 and has become increasingly popular. By the end of 2017, Amazon had sold tens of millions of Alexa-connected devices. This has resulted in Alexa devices securing 55% of the market for virtual assistants by February 2018.

Amazon Lex

Amazon Lex is a chatbot service that allows developers to create either text- or voice-based chatbots, utilizing the incredible power of the deep learning, natural language understanding, and speech recognition that Amazon has developed. Lex differs from Alexa in that it can be integrated into different devices and services.

Lex is most commonly used as a text-based chatbot. There are loads of different ways that users interact with text-based chats, and Lex can integrate with a lot of them. Developers can create Facebook Messenger bots, Slack bots, Kik bots, and Twilio texting bots through integrations built into the Lex platform.

Lex can also be triggered through the AWS-SDK, meaning that it can be put behind an endpoint. This means that developers can set up a system where they post messages to an API and get back the response from Lex. This gives you the flexibility to send messages to Lex from almost any system. This can be used to create a chat window inside a website, create a chatbot on almost any messaging service, or integrate it with any system that can connect with the internet.

Using Amazon Transcribe for speech recognition, you could create a system very similar to Alexa. This has been used very effectively in call centers, allowing a customer to talk to a virtual service representative instead of just waiting until a human service representative is available. This means that a lot of callers can get the information that they need without talking to a human. This has the dual effect of reducing the time to get an answer if the bot can solve your problem, and reducing the number of people going through to the call center, reducing call wait times.