Amazon Alexa artificial intelligence and Machine Learning

October 11, 2018

“Hey, Alexa!” Artificial Intelligence & the Lightbulb That Listens

“Hey, Alexa, what time is it in London?” She answers me promptly, “in London it’s 5:15 PM.” Amazon’s artificial intelligence back end “understands” what I say, and Alexa answers me.

I suppose I should put “she” in quotes. Of course, I’m talking to Alexa through the Amazon Echo Show sitting on my dining room table. I’ve more or less achieved the Alexa singularity: If I raise my voice I can be answered by three devices in three different rooms. At least I haven’t resorted to Internet-enabled light bulbs to let me control the house lights.

Yet.

This isn’t an Amazon review, though. It’s an observation: there is a new and exciting market for software innovation, and as my North Carolina friends would say, it’s a whole ‘nother ball game.

Amazon Echo artificial intelligence on the table
Photo by Rahul Chakraborty on Unsplash

Alexa who?

Alexa — and her competition, Siri and Google Assistant — are the leading edge of a combination of artificial intelligence, serverless applications, and the Internet of Things that is both powerful and a little bit creepy.

Alexa is really a platform that provides speech recognition and a model for spoken interactions that developers can use to build voice-enabled applications, which are called skills. The artificial intelligence is in the speech recognition: Alexa needs to understand spoken commands, parse them, and act on them. Of course, the Internet of Things comes in controlling those devices, from lightbulbs to your TV.

Initially, Alexa was helpful — for example, you could use Alexa to act as an alarm (“Alexa, wake me at 6 AM”) or a timer (“Alexa, set a 10 minute timer please”) — and had some fun Easter eggs (“Alexa, open the pod bay doors” or “Alexa, beam me up.”) You could use Alexa to check on shipments from Amazon (“Alexa, where’s my stuff?”) and even use Alexa to order things from Amazon. Still, there were some annoying limits because it was hard to do anything that required an extended conversation. The Alexa team is adding new capabilities, however, starting with the ability to extend your conversations with some questions and responses — which also means Alexa is more polite if you thank her. (“Alexa, set a 10 minute timer.” “Ten minutes, starting now.” “Thank you.” “No worries.”)

Building Skills Using Artificial Intelligence

Building Alexa skills is not terribly difficult, although it can be a little daunting on your first attempts. The dialogue with the user must be specified pretty carefully so that you provide all the reasonable options; this is not television artificial intelligence. Still, it’s enough to allow something like conversations. For example, there are several “Eliza” applications (this one, for example) that simulate a style of psychotherapy. Eliza was one of the first artificial intelligence applications, built between 1964 and 1966, but still interesting.

Petra the African Gray talks to Alexa through artificial intelligence
Petra the Congo African Grey and her Alexa

The serverless aspect is less obvious, but no less important: an Alexa skill needs to be connected to application code that does the work. The common way to do this is by building an Amazon AWS Lambda, a package of code in Python, Java, or Javascript that can be kept waiting and invoked on demand when needed. As discussed a short while ago, this makes much more efficient use of computer resources, which cuts the operating costs dramatically.

Recently, they announced that Alexa skills would be able to collaborate with other services, which means that an Alexa skill will be able to hand you over to other services, say for printing or to make restaurant and Uber reservations in the same conversation.

“Is Alexa Listening?”

The creepy aspect of Alexa is that in order for her to be able to answer you, she has to be listening. That is, your Alexa devices have an open microphone that could be capturing all your conversations. This doesn’t worry me much — the most embarrassing aspect of it for me is someone capturing me speaking baby talk to my cats — but other people have reported problems.

Of course, Alexa has a running problem that if anyone says “Alexa” she interprets that as you asking her something. In one case, Alexa overheard a conversation in which something like her name was mentioned, followed by other parts of the conversation that sent what was being said as a message to someone else.

Dictating this article presented its own problems, as Alexa kept piping up offering to help.

For all of that, though, I wouldn’t want to be without her. As the Internet of Things becomes more prevalent, voice-controlled computing will undoubtedly become more common, and the “killer app” has yet to come along. When it does, it will make some people rich.

Do you have an innovative AI or IoT project you’ve been dreaming of getting developed, but don’t know how much it’ll cost? Answer a few questions and we’ll give you an estimate in no time!

Charlie Martin
Consulting Software Engineer

Charlie Martin is a consulting software engineer and writer in Erie, Colorado, with interests in systems architecture, cloud computing, distributed systems in general and innovative applications of blockchains in particular. He is available for consulting through Flint Hills Group.

Charlie-Martin-Flint-Hills-Group-Software-Developer
Charlie-Martin-Flint-Hills-Group-Software-Developer

Charlie Martin
Consulting Software Engineer

Charlie Martin is a consulting software engineer and writer in Erie, Colorado, with interests in systems architecture, cloud computing, distributed systems in general and innovative applications of blockchains in particular. He is available for consulting through Flint Hills Group.