Integrating Alexa With Microsoft LUIS

Alexa has a very good Natural Language Processing engine. However, there are other NLP engines in the market that can be used and those are including more and more capabilities.

  • Integrating Alexa with Microsoft LUIS
    • Prerequisites
    • Preface
    • Setting up our Alexa Skill
    • Creating Azure Cognitive Services
    • Creating MS LUIS App
    • Calling MS LUIS from Alexa Skill
    • Final Result
    • Resources
    • Conclusion

Prerequisites

Here you have the technologies used in this project

Alexa and Kubernetes

In this series of posts, you will find all the resources needed to transform or create an Alexa Skill as a NodeJS Express app ready to run on Kubernetes. These are the two possible options you can use for running your Alexa Skill on Kubernetes:

1. Using Mongo Atlas Cloud Schema


Alexa and Kubernetes: Deploying the Alexa Skill on Google Kubernetes Engine (IX)

Now, we have everything prepared and ready to go to a Kubernetes Cluster in a cloud provider. It is a fact that creating a cluster in any cloud provider manually is a difficult task. Moreover, if we want to automate this deployment, we need something that helps us in this tedious task. In this article, we will see how to create a Kubernetes Cluster and all of its required objects, deploying our Alexa Skill with Terraform using Google Kubernetes Engine.

Pre-Requisites

Here, you have the technologies used in this project:

Alexa and Kubernetes: Deploying the Alexa Skill on AWS Elastic Kubernetes Services (VII)

Now, we have everything prepared and ready to go to a Kubernetes Cluster in a cloud provider. It is a fact that creating a cluster in any cloud provider manually is a difficult task. Moreover, if we want to automate this deployment, we need something that helps us in this tedious task. In this article, we will see how to create a Kubernetes Cluster and all of its required objects and also, deploying our Alexa Skill with Terraform using Elastic Kubernetes Service.

Pre-Requisites

Here, you have the technologies used in this project:

Alexa and Kubernetes: Dockerizing the Alexa Skill (III)

The second task we have to do to run our Alexa Skill in a Kubernetes environment is to dockerize our Alexa Skill backend, which now is a NodeJs Express app.

As Kubernetes is a kind of Container orchestrator, this is a mandatory step in our process to run the Alexa Skill in a Kubernetes environment.

Alexa and Kubernetes: MongoDB Persistence Adapter (II)

ASK SDK MongoDB Persistence Adapter package contains an implementation of persistence adapter in Core SDK ask-sdk-core , based on AWS SDK.

What Is the ASK SDK MongoDB Persistence Adapter?

The ASK SDK v2 for Node.js is an open-source Alexa CustomSkill Development Kit. ASK SDK v2 for Node.js makes it easier for you to build highly engaging skills by allowing you to spend more time on implementing features and less on writing boilerplate code.

Alexa and Kubernetes: Alexa Skill as a Web (I)

The very first task we have to do to run our Alexa Skill in a Kubernetes environment is to transform our Alexa Skill backend into a NodeJS app running in an Express Web server.

You can build a custom skill for Alexa by implementing a web service that accepts requests from and sends responses to the Alexa service in the cloud. The web service must meet certain requirements to handle requests sent by Alexa and adhere to the Alexa Skills Kit interface standards.

DevOps Your Skill: End-to-End Tests

This type of test allows us to verify if the interaction of the software components in our Alexa Skill, such as, VUI, lambda, or if a database works as expected. In summary, end-to-end testing tests the application's ability to satisfy all the requests that the end-user can make.

In terms of voice it is not easy to achieve this kind of tests because of the interaction of the voice as an input of the end-to-end test. We will use Bespoken to write our end-to-end tests. Bespoken allow us to make this kind of tests in an easy way!

DevOps Your Skill: Deploy

When the code is checked in the previous steps, it is time to deploy the Skill to the Alexa cloud in order to start the next steps that will run different kind of tests. There are some tests, like VUI tests, integrations tests, end-to-end tests, and validation tests that we cannot run in localhost only with our code. This is why we need to deploy the Alexa Skill to the development stage.

These step are automated in the continuous integration system (CircleCI) and are executed in each new version of the software.

DevOps Your Skill: Integration Tests

Integration tests ensure that the components of an application is running properly at a level that includes the auxiliary infrastructure of the application, such as the voice user interface, the backend, and the integration with external systems.

Integration tests evaluate the components of an application at a higher level than unit tests. Unit tests are used to test isolated software components, such as individual class methods. Integration tests check that two or more components of an application work together, and they generate an expected result, possibly including all the components necessary to fully process a request.

Alexa Skill With Node.js

Alexa Skills can be developed using Alexa Lambda functions or a REST API endpoint. Lambda function is Amazon's implementation of serverless functions available in AWS. Amazon recommends using Lambda functions despite the fact that they are not easy to debug. While you can log to a CloudWatch log, you can't hit a breakpoint and step into the code.

This makes live debugging of Alexa requests a very hard task. In this post, we will implement a custom Skill for Amazon Alexa by using Node.js, npm, and AWS Lambda Functions. This Skill is basically a "Hello World" example. With this post, you will be able to create a custom Skill for Amazon Alexa, implement functionality by using Node.js, and start your custom skill both from your local computer and from AWS. This post contains materials from different resources that can be seen in the Resources section.

Alexa Skill With TypeScript

Alexa Skills can be developed using Alexa Lambda functions or a REST API endpoint. A Lambda Function is Amazon's implementation of serverless functions available in AWS. Amazon recommends using Lambda Functions despite the fact that they are not easy to debug. While you can log to a CloudWatch log, you can't hit a breakpoint and step into the code.

This makes the live-debugging of Alexa requests a very hard task. In this post, we will implement a custom Skill for Amazon Alexa by using TypeScript, npm, and AWS Lambda Functions. This skill is basically a Hello World example. With this post, you will be able to create a custom Skill for Amazon Alexa, implement functionality by using TypeScript, and start your custom Skill both from your local computer and from AWS. This post contains materials from different resources that can be seen in the Resources section.

Alexa Skill With .NET Core

Alexa Skills can be developed using Alexa Lambda functions or a REST API endpoint. Lambda functions are Amazon’s implementation of serverless functions available in AWS. Amazon recommends using Lambda functions even though they are not easy to debug. While you can log to a CloudWatch log, you can’t hit a breakpoint and step into the code.

Alexa Skill With .NET Core

This makes live debugging of Alexa requests a challenge. This post explains a simple but useful solution: it is to wrap code in a .NET Standard class library and stand up a REST API project for debugging and development and a Lambda function project for AWS deployment. This article shows how to create an environment to debug a locally-hosted Web API that uses the same logic that is used by a Lambda function. Everything's written in C#.