5 Adding AI interfaces to a web application

 

This chapter covers

  • Speaking a note with Transcribe
  • Reading back a schedule with Polly
  • Adding a chatbot interface with Lex

In this chapter we will build upon the to-do list application from chapter 4, adding off-the-shelf AI capability to the system. We will add natural language speech interfaces to record and transcribe text and to have the system tell us our daily schedule from our to-do list. Finally, we will add a conversational interface to the system, allowing us to interact entirely through a natural language interface. As we will see, this can be built very rapidly by harnessing cloud AI services to do the heavy lifting.

If you haven’t worked through chapter 4, you should go back and do so now before proceeding with this chapter, as we will be building directly on top of the to-do list application that we deployed at the end of that chapter. If you’re good with the content from chapter 4, we can dive right in and add our note service. We will pick up where we left off, starting with step 3.

5.1 Step 3: Adding a speech-to-text interface

Now that we have a basic serverless application deployed and secured, it’s time to add in some AI features. In this section we are going to add a speech-to-text interface to allow us to dictate a note into the system rather than typing. We will use AWS Transcribe to do this. As we will see, adding in speech-to-text is actually not too hard for such an advanced feature.

5.1.1 Getting the code

5.1.2 Note service

5.1.3 Front-end updates

5.1.4 Deploying step 3

5.1.5 Testing step 3

5.2 Step 4: Adding text-to-speech

5.2.1 Getting the code

5.2.2 Schedule service

5.2.3 Front-end updates

5.2.4 Deploying step 4

5.2.5 Testing step 4

5.3 Step 5: Adding a conversational chatbot interface

5.3.1 Getting the code

5.3.2 Creating the bot