{"id":13918,"date":"2018-02-13T00:00:00","date_gmt":"2018-02-13T06:00:00","guid":{"rendered":"https:\/\/centricconsulting.com\/post\/alexa-hows-the-surf-revisited-amazon-skills_miami\/"},"modified":"2021-12-15T00:14:44","modified_gmt":"2021-12-15T05:14:44","slug":"alexa-hows-the-surf-revisited-amazon-skills_miami","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/alexa-hows-the-surf-revisited-amazon-skills_miami\/","title":{"rendered":"Alexa, How’s the Surf? Revisited – With Improved Amazon Skills"},"content":{"rendered":"
Part two of a series.<\/a> A couple of years ago, I wrote a blog about an emerging technology called Amazon Echo<\/a>. By now, unless you\u2019ve been living under a tree, you\u2019re probably familiar with \u201cAlexa.\u201d<\/p>\n Even if you don\u2019t own one of these smart devices, chances are, you have seen one at a friend\u2019s house or on the numerous television ads in circulation. To put it mildly, these voice assistants have done a lot of growing up in a short amount of time.<\/p>\n So, I thought it would be good to revisit my little Alexa Skill that drove my family crazy with my incessant testing. \u201cAlexa, Ask SurfCheck How\u2019s the Surf?\u201d is practically a four-letter word around my house. At the very least, the phrase elicits a groan or a dirty look.<\/p>\n After a brief overview of the Amazon Echo platform, I\u2019ll introduce the Amazon Lex service, one of the core technologies that Echo runs atop. Since my last blog, I also became an Amazon Web Services (AWS) Certified Solutions Architect and Certified Developer, which enlightened me to all of the mistakes I made when I developed my first Alexa skill. With that in mind, I\u2019ll review how Alexa and Lex fit into the broader AWS ecosystem.<\/p>\n Finally, I\u2019ll focus on one of the key services that I used to update my Alexa Skill, Lambda. Lambda represents Amazon\u2019s entry into the fascinating world of \u201cServerless Computing.\u201d<\/p><\/blockquote>\n In short, this blog is a mix of things:<\/p>\n If you read my previous blog about Alexa, you\u2019ll recall that Echo is a family of devices made by Amazon, of which, Alexa is the most widely known. The image below shows how Alexa\u2019s family has been growing over the past couple of years, including a couple of newer siblings that add a visual aspect to the user interface (Show and Spot).<\/p>\n At its core, however, Echo is still a wireless speaker and voice assistant. Users still interact with Echo primarily using their voice. The new visual aspects of the Echo platform are meant to complement the voice user interface or VUI for short.<\/p>\n Amazon and other developers create Alexa Skills that enable the Echo to perform specific conversations with a user. For example, I created an Alexa Skill, Amazon\u2019s technology for creating a voice user interface \u2013 called Surf Check \u2013 that enables a user to, not surprisingly, check the surf conditions at his or her local surf spot.<\/p>\n At the time of writing this blog, there are more than 20,000 Alexa Skills published in Amazon\u2019s marketplace. This number will undoubtedly continue to rise as more and more Echo devices are sold.<\/p>\n <\/p>\n With the success of Echo, Amazon realized that the underlying technology that powers Echo could be used for other applications. That led Amazon to introduce Lex, a service for building conversational interfaces into any application using voice and text.<\/p>\n According to Amazon, \u201c\u2026Lex provides the advanced deep learning functionalities of automatic speech recognition (ASR) for converting speech to text, and natural language understanding (NLU) to recognize the intent of the text, to enable you to build applications with highly engaging user experiences and lifelike conversational interactions\u2026\u201d<\/p>\n Of particular interest to me was the ability to re-use the same conversational interface I had for my voice-driven Surf Check Alexa Skill, but in a text-driven interface, also known as a chatbot. What is a chatbot? Derived from the terms \u201cchat robot,\u201d a chatbot allows for a conversational interaction, using either text or voice. Chatbots have become quite popular on mobile and web platforms such as Facebook Messenger and Slack, where they enable the automation of tasks such as customer support.<\/p>\n Using Surf Check as an example, let\u2019s say I am not at home, but I still want to check the surf. Since my Echo devices are all at home, I can\u2019t say \u201cAlexa, ask Surf Check how\u2019s the surf?\u201d But, I can open up Facebook Messenger on my mobile phone and send a text message (\u201chow\u2019s the surf?\u201d) to a Surf Check chatbot, thanks to Lex.<\/p>\n In fact, Amazon has made developing a Lex interaction nearly identical to an Alexa Skill. Lex uses Intents and Slots, just like Alexa. So in theory, I could write a new conversational application that supports both Lex and Alexa interactions using identical code. The only difference would be that one interaction outputs text and the other voice. This is obviously very powerful for developers to have in their toolbox as it allows consumers to connect to a virtual assistant from anywhere.<\/p>\n Until now, this blog has focused on the voice user interface that Alexa provides and the foundational technology behind Alexa called Lex. But as compelling as both of those are, conversational interfaces by themselves are not what make the platform so powerful. Combining an Alexa Skill or voice user interface with one or more cloud services is the secret sauce that takes this technology to another level.<\/p>\n (Note: a detailed description of Amazon Web Services (AWS) is beyond the scope of this blog. What follows is a brief description of \u201cthe cloud\u201d; but look for a follow up blog where I\u2019ll take a deep dive on AWS and Serverless computing.)<\/em><\/p>\n Ever since the World Wide Web came into being, the model of stitching together disparate services to appear as one has been the domain of server developers. In addition, the hardware required to support this effort had to be provisioned, typically in a data center at a different location (\u201cin the cloud\u201d) from where the developers worked.<\/p>\n The costs of maintaining the hardware and data center usually made this a headache for large companies and prohibitive for small companies. However, several companies including Amazon, Google, and Microsoft realized that \u201cthe cloud\u201d could lower the cost and complexity behind provisioning these services.<\/p>\n Nowadays, when people refer to \u201cthe cloud\u201d, they are referring to three primary resources:<\/p>\n As I mentioned in the introduction, I am partial to Amazon\u2019s cloud offering, Amazon Web Services (AWS), and have attained two AWS certifications. With AWS, a developer like me can roll out an application using cloud storage, a server, and a database without ever buying or touching a physical piece of hardware. AWS allows a developer to provision all of the resources and pay for them based on usage all from the AWS web console.<\/p>\n Using AWS, I was able to update my Surf Check Alexa skill to include a database for storing information about users and move web services to a serverless component called Lambda. More details on that are provided in the following sections. The diagram below provides an example of how to create a weather application using various services available in AWS.<\/p>\n <\/a><\/p>\n The other big change I made to my Alexa Skill was to use Lambda to process requests from Alexa. Amazon\u2019s Lambda service describes serverless in this way: \u201cRun code without thinking about servers.\u201d<\/p>\n The name \u201cserverless\u201d itself is a bit of a misnomer, as servers are a critical component of any cloud application and aren\u2019t going away anytime soon. However, the ways a server is deployed can vary and along with those variations come a wide range of costs.<\/p>\n Serverless computing aims to tackle two primary issues with cloud computing: streamlining the tasks associated with deploying a server and reducing the costs associated with running a server. As is typical in technology, a crisp definition of a buzzword is often hard to come by. Serverless Computing is no different.<\/p>\n In fact, a lot of people drop the term \u201ccomputing\u201d from Serverless Computing and just call it Serverless<\/i>, causing even more confusion. My definition of serverless may be slightly different from the one provided by most of my colleagues. But all of the definitions should have some of the following traits in common.<\/p>\n Serverless is characterized by:<\/p>\n Both Microsoft and Google have competing serverless offerings that work in much the same way as Lambda. Microsoft\u2019s offering is called Azure Functions, while Google\u2019s version is called Cloud Functions. Not very creative, but I\u2019ll take function over form every time!<\/p>\n Here are the languages currently supported on each platform:<\/p>\n <\/a><\/p>\n The diagram above illustrates how all of the AWS components are brought together to provide a seamless Alexa and Lex experience.<\/p>\n Not surprisingly, a lot has changed in the technology world in only a couple of years. Hopefully, this blog has shown the improvements made around Voice Assistants, Chatbots, the Cloud, and Serverless Computing.<\/p>\n Bringing all of those pieces together, I was able to:<\/p>\n I did all of the above without needing a data center or a lot of money. My AWS bill for the month of December was less than $1 \u2013 including all of the components described in this blog and my entire personal web site!<\/p>\n Chris Martinez, who is AWS Certified, has some updates to make on his last Alexa blog, now that he’s improved his Amazon skills.<\/p>\n","protected":false},"author":63,"featured_media":13920,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"categories":[1],"tags":[16613],"coauthors":[15012],"acf":[],"publishpress_future_action":{"enabled":false,"date":"2024-07-21 22:26:56","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/13918"}],"collection":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/comments?post=13918"}],"version-history":[{"count":0,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/13918\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media\/13920"}],"wp:attachment":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media?parent=13918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/categories?post=13918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/tags?post=13918"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/coauthors?post=13918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\n<\/a><\/p>\n<\/div>\n\n
Overview of Amazon Echo<\/h2>\n
Introducing Amazon Lex<\/h2>\n
The Bigger Picture (aka AWS)<\/h2>\n
\n
Serverless Computing<\/h2>\n
\n
\n
\n
\n
\n
\n
\n
\n
Bringing it All Together<\/h2>\n
\n
\nReferences and Further Reading<\/h3>\n
\n