5 Making a conversational Alexa skill

This chapter covers

  • Sketching out a skill’s conversational flow
  • Keeping track of skill flow by using state
  • Connecting to a database for cross-session storage

So far the Sleep Tracker and Super Sleeper skills have been of the call-and-response variety: when I say X, you say Y. Adding a number of different responses gives the skill more of a personality: when I say X, you randomly say U, V, W, Y, or Z. That’s where the skill ends, though. That’s not how real conversations work.

In human conversation, even the most perfunctory requests for information have the opportunity for back-and-forth. For example, you need to know the next arrival for an uptown train, so you look at someone standing on the platform ...

Get Voice Applications for Alexa and Google Assistant now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.