Monitor performance issues & errors in your code

#146: Building Alexa Skills with Python and Flask Transcript

Recorded on Wednesday, Dec 20, 2017.

00:00 Michael Kennedy: Voice assistants and voice interfaces are quickly becoming the new hot way to interact with computers. Two of the more notable ones are Amazon Echo Devices and Google Home Devices. Wouldn't it be great if we could program these with Python? And even better if we could use well known APIs, such as Flask? This week, you'll meet Eric Cho, Dave Vutula and Cam Sweeney who discuss their frameworks and apps they've built around Amazon and Google devices. This is Talk Python To Me, Episode 146, recorded December 20th, 2017. Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem and the personalities. This is your host, Michael Kenendy. Follow me on Twitter where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via @talkpython. This episode is brought to you by Datadog and us, here at Talk Python Training. Be sure to check out what we're offering during the segments. It really helps support the show. Hey, everyone, quick bit of news before we get started on the episode. First, it's 2018 and we have announced some of our 2018 courses over at training.talkpython.fm. So there's a bunch of cool ones that are listed. And we've already shipped our first course, Mastering PyCharm. If you're trying to get better with PyCharm, of you've tried this application that can do so much for your Python code, and kind of got overwhelmed, well, here's an eight-hour course, with hands-on exercises that can really help you get better and more productive with PyCharm. So be sure to check that out. And if you are interested in the course or any of the other courses, we announced a new way to buy them, The Everything Bundle. So now you can pay just one price and own every course at Talk Python Training forever. It's way better than a subscription and about the same price. Be sure to check both of these out over at training.talkpython.fm. Thanks for checking out the courses. Now let's get to the interview. Eric, Dave, Cam, welcome to Talk Python.

02:08 Eric Cho: Hey.

02:09 Dave Vutula: Good to be here, thanks.

02:10 Cam Sweeney: Yeah, thanks for having me.

02:10 Michael Kennedy: Yeah, I'm really looking forward to talking about talking to computers. It's going to be a good time.

02:16 Eric Cho: For sure.

02:18 Michael Kennedy: So we're going to talk about Alexa. And just a warning to everyone out there listening. If you have some kind of Echo device, some kind of Alexa-enabled device, it's a really good time to mute it, because while sometimes on podcast we can avoid saying things like Alexa or Siri or those types of activation words, that's not going to work for this one. It's just not. So put yourself on mute, just fair warning there. So let's start at the beginning. I guess we'll start with you, Eric, how'd you get into programming with Python?

02:47 Eric Cho: Thanks for having. And how'd I get into programming? So you know how there are people who knew they wanted to be a programmer since they were age seven? I'm definitely not one of those. I'm considered a late bloomer. I think I remember not long ago, I was on your show talking about getting your first gig as a software developer. So that's kind of the timeline I--

03:07 Michael Kennedy: Yeah, that was Episode 39. That's like almost two years ago. But, yeah, that's awesome.

03:12 Eric Cho: Yeah, almost two years ago. So I used to use, so I've been a network engineer for most of my adult working life. And I used Python to solve network engineering problems. And I just kind of never looked back.

03:24 Michael Kennedy: Okay, awesome. Yeah, and networking is increasingly becoming a programming job itself, isn't it?

03:29 Eric Cho: Absolutely, so, you know software defined networking, although the original idea of open flow never took off, but it actually puts software to front and center of network engineering. So without going too much deep into it, you know, I think it's just this fundamental shift that's going to be around for a long time.

03:45 Michael Kennedy: Yeah, absolutely. Dave, how about you?

03:47 Dave Vutula: Oh, I've always been really a hobbyist, mostly starting with my parent's TRS80 color computer back in the day, when I was a kid, working with basic and fiddling around with that. Coming to Python, I honestly can't quite remember when I got started. I think it might've been towards the end of high school, maybe sometime early in college. I do vividly remember I've kind of made a personal choice not to learn Perl and instead picked up Python. So sometime around then.

04:14 Michael Kennedy: If I look at the popularity of those two languages, I would say that was probably a good fortuitous choice there. And, Cam, how about yourself?

04:24 Cam Sweeney: I'm kind of like Eric. I didn't really get into programming 'til later in life. I went to school to become a biologist and probably like the last few months of college I just started picking up Python with automate the boring stuff. Just decided that's what I wanted to do. Say it's only been a few years. I remember listening to that show with Eric about getting your first job. And that's actually really helpful.

04:52 Michael Kennedy: That's really awesome, yeah. What a crazy way to circle back right?

04:57 Cam Sweeney: Yeah, seriously, small world.

04:58 Michael Kennedy: And now you're on this podcast with Eric.

05:01 Cam Sweeney: Yeah. No, it's nuts.

05:02 Eric Cho: Yay!

05:04 Michael Kennedy: Yeah, it certainly is. So do you still do any biology or you're just doing programming these days?

05:10 Cam Sweeney: Oh, yeah, I'm just doing biology or programming. Never even stepped foot into a lab after school.

05:18 Michael Kennedy: You know what? There's a place better for creating stuff out of bits. Let's do that.

05:23 Cam Sweeney: Yeah.

05:24 Michael Kennedy: Sorry, all right, so maybe let's go to you, Cam, since we were just talking about it. What do you day-to-day these days?

05:30 Cam Sweeney: Yeah, so currently I'm freelancing and doing contract work for this company called Perduvia. It's basically using AI and chat services for different industries. Currently we're working on something for the hotel industry things.

05:46 Michael Kennedy: That's cool. Is it voice assistance stuff or is it more like chat box like a Facebook Messenger type thing?

05:52 Cam Sweeney: Yeah, so it's just been more messenger like Slack-based and web-app-based, but we're planning on moving it to the voice space pretty soon. So it's pretty exciting.

06:01 Michael Kennedy: Yeah, it's definitely an exciting time for that. Dave, how about you?

06:04 Dave Vutula: I'm an independence software consultant, mostly in the enterprise space and kind of the sexy realm of knowledge management and enterprise search.

06:15 Michael Kennedy: Do you search all the things inside of your company?

06:18 Dave Vutula: Yeah, not as marketable as like AI and actual chat stuff.

06:22 Michael Kennedy: Yeah, but that's an important thing. Like these companies are huge. And stuff gets crammed into Sharepoints that people don't know about, and Excel and Access, it's insane, right?

06:32 Dave Vutula: The backend like real-world, as I kind of call it. It's predominately Excel. That's the reality. That's where I spend most of my time, mostly in the realm of Java, but when I get a chance to choose, I usually choose Python for some projects. So I've got most of my experiences sort of Java and Python and how do we get them to talk to each other, especially when dealing with interacting with any of these legacy enterprise systems.

06:56 Michael Kennedy: Okay, and do you... So do you contribute to this thing called JPI and JPY? What's the story with that? JPI, yeah.

07:03 Dave Vutula: Yeah, I had a particular request from a client to deal with an old kind of proprietary binary format from a, I'm not going to say the vendor's name, but a statistical software package. And this format had been around for a long time. Needless to say, somebody had reversed engineered it already which was great, and published their findings, and it was really wrangling bits and bytes dealing with pages of data inside this file format. And since this all had to be plugged into a Java program, long story short, I found it easier to solve the problem. Python, and I just needed to find a way to stick that inside this Java app. Luckily, JPI, I came across, is written by a consultancy in, I think, Germany. Contracted to like the European Space Agency. And they wrote it originally to deal with this kind of data interchange between some other application that the ESA uses for the scientists and everything to get data in and out. And they wanted to use Python like a lot of folks in the scientific community. So I was able to take that and figure out a way to plug it in, solved some problems along the way.

08:07 Michael Kennedy: That's pretty cool. The only way that I knew about... Was aware of to do that before was with Jython. And so is it kind of like Jython?

08:14 Dave Vutula: So it doesn't run on the JVM. It's nice and simple in that it's basically automation and kind of data passing between the JVM and a Python interpreter. And you can do it bidirectionally. So from Java, you can spin up a Python interpreter and run Python code, get data back in Java, using the Java Native Interface. And the really cool thing is since, I can't remember the person's name, but somebody did a fantastic job in the last year or so with the Windows distribution of Python.

08:46 Michael Kennedy: Right, that would be Steve Dower. Thank you, Steve, yes.

08:48 Dave Vutula: Yeah, and it's great, 'cause you can easily bundle it with something like this and pretty much ship it with your product and have an embedded Python instance. And it's funny that it works great on Windows yet most of the time it's a headache on Linux. I just don't get it.

09:03 Michael Kennedy: Yeah, how funny. That's kind of the opposite. All right, Eric, you're doing network stuff? Like you said just a little bit ago.

09:09 Eric Cho: Yeah, so mostly networking stuff, but lately, I think, for the past two years ago, it's being very focused on network security, kind of accidentally. And so within network security, a very focus on distributed denial of service, and use quite a bit of Python, but also other tools, you know, whatever works for us to glean a little bit for that thread intel piece for DDoS.

09:30 Michael Kennedy: No, that's really cool. Yeah, the whole computer security stuff around just both sides, the white hat, black hat, whole thing is really Python heavy, so that's pretty cool.

09:40 Eric Cho: Yeah, absolutely. And I think for us, since we're sort of a startup-ish company and certainly a small operation, so we choose to be very focused on solving this DDoS space well. And, you know, people talk about 10X better, and that's what we shoot for. Like if we could do 10X better than our competitor then we're able-- People, our customers, potential customers will be able to grasp the benefits of our stuff rather than our competitors. So that's what we shoot for.

10:08 Michael Kennedy: Yeah, sounds like a fun project. All right, so let's start out by talking about these voice assistance in general. We're going to focus on Alexa. They've got a really good developer story, they've got a really good Python developer story and you guys have all either created some skills or worked on frameworks for creating skills. But let's say maybe, Dave, can you give us kind of a survey of the various options we have? We've got Alexa, we've got Google Voice and so on?

10:35 Dave Vutula: There's Alexa, Google Assistants, can't remember exactly what they're calling it. If anyone can jog my memory here. I'm more well-versed in the Amazon ecosystem, or Echo-system, if you will.

10:46 Michael Kennedy: Would you guys count Apple's Siri? Or Microsoft Cortana in this space?

10:50 Dave Vutula: Have they opened those up with APIs and SDKs?

10:54 Michael Kennedy: I actually don't know. You know, Apple's so weird. They have like NDAs for developers. So I haven't been paying attention for Apple. And I also, I just haven't been paying attention to Cortana.

11:07 Dave Vutula: Yeah--

11:07 Michael Kennedy: So I don't know.

11:08 Eric Cho: Yeah, I would say that's probably a no last time I checked. But it was a few months ago. For Siri and Cortana, definitely not, but for Google, yes. But they don't really promote it. So it wasn't until I actually got a physical Google, I guess, Mini, that I started looking at it. And they do have a developer platform that opened up with third parties, whatever they call it, skills equivalent of Google. But that's, you know, Amazon's been really at the front and center for catering toward third party developers, I would say.

11:40 Michael Kennedy: Yeah, that's interesting. I mean, on one level or another, all of those companies have been pretty good towards developers. But Amazon with AWS and all the stuff going on there, they're really kind of built for that, right? You can leverage their Lambda computing to implement your Alexa skill, for example, things like that. So pretty interesting.

12:03 Eric Cho: Yeah, totally. And also I think they're actively going out. So you don't see as much, say, meetup groups, or trainings, and I know they actually contracted Big Nerd Ranch to do Alexa trainings to bring people up to speed. And you see a lot of Twitter feeds from their evangelist. So I think all this feeds into the funnel of people. You know, maybe you could reach a thousand developers and maybe 10% to 1% of them actually take up. And then you funnel it down to the people who actually will publish skills. So I think Amazon's the biggest, I guess, spread out the biggest net for these developers and then trying to catch those who are interested in the space.

12:41 Michael Kennedy: Yeah. Cam, what do you think?

12:42 Cam Sweeney: Yeah, definitely. Google, they have it open, and it's actually, it's gotten a lot easier to develop for the Google Assistant. But like Eric was saying, they don't really advertise that our anything, whereas Alexa's like, they're just reaching out for anyone to develop. Like they're really pushing it as something anyone can get into, which is really cool. And then Siri, I'm pretty sure they don't really even have that open or anything. I've never head of any third part Siri skills or whatever, which is pretty suprising, just 'caue they were the first of the space. And I feel like they kind of maybe dropped the ball with that.

13:20 Michael Kennedy: I totally agree. There's no way they can't have some sort of programming API, though, right? Since they're going to have their HomePod thing. And I just looked. Microsoft has the Cortana Skills Kit, which came out in September, but it's public preview. So that's also, I guess, a thing. But their devices aren't really out yet. Although there's some interesting places. I guess it shows up.

13:42 Cam Sweeney: Yeah, I think Cortana, even though like the development kit's not really out there, I'm pretty sure they do have a good amount of integrations with different services, aren't strictly aimed at Cortana. So that's kind of cool.

13:56 Michael Kennedy: Yeah, they definitely are trying to integrate that into Azure and all their cloud stuff. So let's maybe just go down the list of the hardware that's available. So, by way of contrast, for Apple, I guess you have your phone. I guess you have your Mac, if you turn that on. And you have this HomePod thing. If you look at Alexa, I'll go through the list kind of quick 'cause there's tons of it. There's the Echo, which is like this tall speaker thing. There's Echo Plus, which the same speaker, but is also a smart home hub. There's Echo Show, which is like a touchscreen video type of version. There's the Connect, which'll turn it into a landline. There's the Echo Spot, which will let you make video calls and stuff, that one's kind of cool. It's got a little screen on it. There's the Dot, that's like the little mini one, there's the Temp, the Look, the Fire TV, and they actually are integrating them into cars as well, which is pretty cool. So Ford Sync is coming out with Alexa integration, so you can, say, ask it for driving directions and play music and stuff like that, which is cool. And BMW and Mini are also integrating it as well for the 2018 models. So that's just some of the devices that these skills run on, right?

15:15 Eric Cho: I would also add to that. So the Spot, so we're recording this on the 19th of December, and that's when the Spot will actually come out. So I think outside of a few tech reviewers and onsite reviews, website reviewers, nobody has seen the Spot yet. Yeah, and then Show's kind of expensive, so I would say mostly in wild you will see the Echo and the Echo Dot, especially if you're talking about cars. There's a bunch of YouTube videos showing people how they fit like the Dot directly into the cupholder. And that's kind of cute and neat. And I know a bunch of my friends have done that.

15:49 Cam Sweeney: I've actually done that, too.

15:53 Michael Kennedy: I would do that if it wouldn't freak out my wife. She doesn't like it around, so much she's not, we'll talk about the thing, constant listening, right? And my car has four USB plugs and it runs off USB. You could just put it one of those little cupholders. It'd be awesome. But, no, it doesn't go out in the car in my house. I guess we should make the distinction between Alexa and all the pieces of hardware I talked about. So there's all this hardware and then there's Alexa. Dave, you want to maybe talk about the two?

16:22 Dave Vutula: I mean, the hardware's really just a gateway to interact with the Alexa service. And the primary kind of concept is this idea of an utterance or a user's intent. So what is the user intending to try to do when they talk to the device? I believe Amazon splits the technology up into at least two or three difference services now in the backend. That as a developer at scale you could use individually, for different things like voice recognition or text to speech. So it's kind of like the front end and back end of the Alexa service. But to the consumers, they really interact with just the sort of the combination of all that.

17:02 Michael Kennedy: Right, and can you take the Alexa AI piece, the software piece and put it on your device. Like if I was on Kickstarter making some like smart bike that would, I don't know, turn on the blink, or when I would tell it to turn it's like whatever, something stupid. Could I get that and plug it in?

17:18 Dave Vutula: Yeah, couple folks have done some interesting projects like that. A while back I know one of the initial kind of popular hacks that appeared online was somebody taking a Teddy Ruxpin and making it speak, and basically becoming kind of a conduit for Alexa. And it was both exciting and creepy at the same time.

17:37 Michael Kennedy: That's exactly how I imagined it would be.

17:40 Dave Vutula: There's still some videos on YouTube. You can even use a piece meal, so if there are things where you wanted to build a service that did text to speech, you could use that portion. If you just needed to deal with sort of understanding and matching with some confidence what the user's utterance was, they have that as a service as well.

17:57 Michael Kennedy: That sounds pretty cool. It's definitely some really neat services that they have. And seems like it makes it really easy to plug in your logic into their kind of text and system understanding.

18:06 Dave Vutula: Yeah, and like most Amazon services, you can either use them as individual piece meal kind of components or pull them together into a solution.

18:15 Michael Kennedy: I guess one of the things I want to do is give the people the sense of some of the skills that you can have on an Alexa device and then talk about ones that you have all either contributed to or worked on, or something like that. So let me just run down the list. So there's over 20,000 Alexa skills now, which is pretty awesome. It definitely seems like the place where developers are building new things compared to all these other places we talked about. So you have for finance, you can like ask what your credit card balance is You can ask what stock price is. You've got if this, then that integration. So, you know, if I get an email from this person that says this, put it on, I don't know. You can speak to it about all the if this, then that, you basically integrate with that. It integrates with like electric cars. So I have a charge point charter for my car and I can ask it. You got to direct it towards the skill, so you say like, "Ask Chargepoint how miles were added the last time when I charged?" Or something like that. So there's really smarthome, drinks, you could ask it like what cocktail you should have, how to make it. Flash briefing, travel, like you could ask it where you could go for $400 or less, all sorts of stuff, right? Maybe go around, each one of you, like what's your favorite skill that's out there? Cam?

19:28 Cam Sweeney: Not sure what my favorite skill would be but I never published a skill to like the Alexa Marketplace, or whatever it's called. But I've mainly just created like little personal ones for my own use, back before I found out about this project called Home Assistant, which basically connects different smart appliances. I use it to like control some lights and stuff. And then for my old job, I would just ask Alexa to trigger like scripts to run my computer, like nightly.

19:58 Michael Kennedy: Alexa, is my server up? "No." Alexa, reboot my server?

20:03 Dave Vutula: Alexa, am I still employed?

20:07 Cam Sweeney: Then I also created the audio sample skills for the Flask Ask repo, which we'll be talking about in a little bit. And that was pretty fun.

20:15 Dave Vutula: Yeah, I really like how Alexa allows you to stream audio, like good sized audio streams. That makes it really cool.

20:22 Michael Kennedy: Yeah, I do a lot of listening to music on my Alexa. It's cool.

20:25 Dave Vutula: Yeah, definitely.

20:26 Michael Kennedy: How about you, Eric?

20:27 Eric Cho: Yeah, my favorite skill is my skill. So I published server skills and the ones that are my favorite and starting to attract the most unique users per month is Seattle English Tutor. So if you imagine just having this person or this assistant who would help you train your English skill if English was your second language, which was my case, then that's what it is, right? So the first time I heard how Alexa operates and see a few examples, this just brings to mind, and, of course, this was also inspired by Mandy Chen.

21:02 Cam Sweeney: So she was one of the earlier developers/evangelist, and she put out this beta and I just kind of took it from there and published this skill and working on version two of that.

21:11 Michael Kennedy: That's pretty exciting. Very cool. Dave?

21:15 Dave Vutula: It's a toss up. So, you know, your favorite is usually the one you have published, if you've got one published. So I've worked with Vermont Public Radio to help them basically create an Alexa skill that would allow users to stream their live streams, as well as the episodic podcast content that they release.

21:31 Michael Kennedy: Yeah, that's cool. I'm thinking about doing that for the various podcasts, like especially around Python Bytes, 'cause it's got all these little pieces and there's a lot of cool things you can do with audio, 'cause that's the native format of this thing, right?

21:42 Dave Vutula: It's quite awesome. You can just kind of point the Alexa service at a stream and it can handle kind of starting and stopping and just kind of knowing a little bit of where it left off.

21:52 Michael Kennedy: And you also had another one that got banned, right? Like you were a Rebel?

21:53 Dave Vutula: Yeah. When I first my Dot, it was almost a year ago. I think it was Christmas last year. The very first thing I did was make a skill that would interact with Twitter, go to Donald Trump's Twitter feed, grab a random Tweet of his last 100 or 200, whatever's accessible via the API, and read it out loud. So you could Alexa, what's either his latest tweet, or to ask Alexa to read a random one. And it was almost always comical. But after submitting it--

22:27 Michael Kennedy: But they wouldn't put it up there, huh?

22:28 Dave Vutula: No, so they were running, this kind of goes back to the idea of Amazon having done a pretty good job in developer outreach. They were offering a free Amazon hoodie if you got a skill published in the store before maybe January 10th, or something like that. And I submitted it and they rejected it because of copyright infringement, allegedly. So,

22:49 Michael Kennedy: Wow.

22:52 Dave Vutula: I didn't know you could own your tweets. That's sort of news to me. My guess is they were just sort of afraid of the litigious Donald Trump at the time.

23:01 Michael Kennedy: Yeah, it must be, because that is a public thing. And especially now it's communication of the United States government, in a sense. So that, I mean, that's, kind of in one sentence, all ours, I guess. I don't know.

23:15 Dave Vutula: It turns out, I did some digging. There were some already in the Skills Store. They avoided using Trump's name. So they said things like Presidential Tweets, or something like that.

23:24 Michael Kennedy: This portion of Talk Python to Me was brought to you by Datadog. Datadog is a monitoring solution that provides deep visibility into your Python apps, so you could understand why certain requests are slow or what caused a specific error. Datadog's open source tracing client auto instruments popular libraries like Flask and Redis, as well as async libraries like AsyncIO. So you can get started without making any code changes. Within minutes, you'll be able to investigate bottlenecking in your code by exploring interactive flame graphs in rich dashboards. Start a free trial to see for yourself. As a bonus, Datadog will send you a free T-shirt. Just visit talkpython.fm/datadog for more details.

24:04 Eric Cho: The certification process and all that is kind of evolving, just like everybody, they're kind of evolving as we go. So if you put the name unofficial, or like fan, or fans of, or whatever, then you get a, not to guarantee it, but you have a easier time getting it approved if it was something of that nature.

24:26 Michael Kennedy: Okay, yeah, that's good advice.

24:27 Eric Cho: The President of the United States is another matter. But, yeah, just like normal companies, like Fan of Disney of, you know, whatever it is, so something like that.

24:36 Michael Kennedy: Cool. All right, well, let's talk about how you build these things. So obviously Python is a good way to do it, which is pretty awesome. And I guess the first thing people might wonder is do they have to commit to going and buying an Echo device, piece of hardware, so that they can do this?

24:52 Eric Cho: The answer's no. It's like developing for Android apps. You could use the simulator. It's not as good as the real thing, but it'll get you closer so you feel like you were committing, you feel like committing to a hardware purchase. And, of course, the hardware's getting cheaper and cheaper, and so on. So the software that you could use is Echosim.io for the website to kind of click on it and then speak and just behave just like Alexa, except you can't do voice streaming. So I don't know if you could do podcasts and so on. And another tool is your Reverb mobile app that you could download and then behave just like Alexa.

25:26 Michael Kennedy: That's like an iOS app, but then you can talk to it and it basically it isn't Alexa but it's just a software one, huh?

25:34 Eric Cho: Yeah, absolutely, so it's like, you know, it's both Android and iOS, as far as I know. And so when you launch it it just has this big dots, right? Like the whole screen just filled with the dot. And you would click on it and then it listens for whatever input using your microphone and then it dishes out a response that way. And you link it to your Amazon account, of course.

25:51 Michael Kennedy: Cool. So one thing that I ran across getting ready for this show that I had seen a couple years ago and I kind of forgot, but it seems so super helpful here is in Ngrok. Have any of you guys used Ngrok for this?

26:02 Cam Sweeney: Yeah, Ngrok is a great tool.

26:05 Michael Kennedy: Tell people what it is.

26:06 Cam Sweeney: It exposes a local port on your computer and basically tunnels... Provides you a public URL that will tunnel traffic through that into your local port. So if you're like developing a skill or some other type of application that needs to receive requests from the outside, you just fire up Ngrok and point it, give it the port you want to expose, and then you get this temporary Ngrok.io URL. And that's basically just a public URL that you get for free.

26:41 Michael Kennedy: Yeah, that's really cool, because one of the reasons you need that is you basically have two choices when you set up an Alexa skill as you go through the Amazon dashboard. And one of 'em is, where do we invoke the logic of your skill? And it could either be an AWS Lambda, which is the serverless computing thing, which you can definitely do in Python. Or it could be some HTTP endpoint. And so if you want to do like a dev version, testing on your machine, you can run say like Flask or Flask-Ask, for example, on local host on a certain port. And then you can use Ngrok to map that local host only port out to Ngrok.com, io, whatever it is. And that becomes a public HTTPS URL that you can tell Amazon that's how to get to it. And I actually hits your dev server. I guess you can even have like break points and all sorts of crazy stuff when you talk to Alexa, right?

27:35 Eric Cho: I think for Ngrok, the free version, 'cause I actually looked into Ngrok, not for Alexa skills but for my day job. So I think for the free version you can have ports when you launch. And if you pay, I think $10 a month, you get two reserved ports and you can even use custom domains for you to fixed on when you launch Ngrok. But, yeah, you know, if you don't use Ngrok, I guess let's just say you have your own HTTP server, you have to worry about like certs, and you have to worry about trusting issues and so on, so Ngrok is kind of what I've seen people do. If they don't use Lambda, use your own server.

28:09 Michael Kennedy: Okay, that makes a lot of sense. All right, so I guess, Eric, I'll stick with you for a sec. What do you use when you're writing these skills? Like what's the tech stack look like?

28:18 Eric Cho: I just use the... I think other people would echo this, the front part, like the interaction with Alexa to resolve whatever your voice stream is into an intent. There's no other way than to just using their templates, using the Ask Alexa skill kit, and then, like you mentioned, I use the triggering for Alexa as a input to trigger my Lambda function. And then Lambda function, if I need a database, I use DynamoDB. And that's kind of the whole flow.

28:46 Michael Kennedy: Yeah, that's pretty cool. DynamoDB is a really interesting NoSQL, as a service, inside AWS, which is cool.

28:52 Eric Cho: Yeah, super fast.

28:53 Michael Kennedy: Yeah, it's crazy fast. That's cool. Cam, how 'about you?

28:56 Cam Sweeney: Yeah, so I don't use Lambda or AWS or anything. I just typically will, since I haven't published, it's usually just do Ngrok. But I write all the code using Flask-Ask. And then once I'm ready to kind of just have that running, I host it on Heroku, just like the free tier. So it's kind of just two steps.

29:17 Michael Kennedy: Yeah, that's nice and easy.

29:18 Cam Sweeney: Yeah.

29:19 Michael Kennedy: Yeah, we'll definitely, we'll talk more about Flask-Ask in just a second. Dave, how about yourself?

29:23 Dave Vutula: Yeah, it's Flask-Ask and Heroku. And with Heroku, the free tier, for most skills, especially if it's sort of just a personal skill and you don't expect it to become like a top 10 skill in the Skill Store, you can pretty much run the free tier indefinitely.

29:39 Michael Kennedy: I can imagine. Like how much traffic could Alexa possibly generate?

29:42 Dave Vutula: That's sort of the good thing is that it's very kind of quick in the interactions. And even if you're doing something with audio and audio directives and opening a stream, the stream actually goes form the stream source to Amazon and then to the endpoint, whether it's a dot or something else. But you don't have to worry about--

29:58 Michael Kennedy: You don't have to flow it.

29:59 Dave Vutula: Yeah, you don't have pass that through.

30:01 Michael Kennedy: Yeah, that makes it really nice.

30:02 Dave Vutula: Yeah, so your Heroku instance or something else could spin down for awhile. That stream could play for a half hour. The user might then pause it or stop it. And then you'll get the call to your server from Amazon saying that the user stopped the stream.

30:15 Michael Kennedy: Yeah, so it seems like a lot of stateless really quick, sort type of things.

30:18 Dave Vutula: Yep, definitely. And that's sort the catch is the stateless part is that, this is probably getting a little too far ahead, but, I mean, that's really the hardest part in dealing with the skill development is that Amazon assumes you're going to wrangle all the statefulness.

30:31 Michael Kennedy: Right, and that might be why you might want a database for something, like Eric was saying.

30:36 Dave Vutula: Right.

30:37 Michael Kennedy: More or less push the session into the database. Next request comes in from that user and you like kind of infer where you might want to pick up again.

30:44 Dave Vutula: 'Cause it's not like normal web application development, where you might have a cookie or a session or something, and then all this middleware you can use. It'll automatically pick that up.

30:53 Michael Kennedy: What do you use to trigger off of to identify the user? Do you have their account, their device ID, something like that?

30:58 Dave Vutula: From my experience, there are a couple different things and they change based on, basically, what part of the Alexa skill's API you're using. For things like audio, it's once the user actually starts a stream and they start hearing audio on their Echo device, it actually closes the session. So your session that might be tracking with a session ID actually is no longer. When that user, that same user issues a stop or a pause or a skip, it'll look like a brand new request to your Echo application, in Heroku, for instance. So there's like a special, I believe, context ID. This is an area it actually caused me to give a whole 45-minute talk at a local Burlington Python meetup here around the oddities of this. But for awhile there's even discrepancies in Amazon's only.

31:47 Michael Kennedy: Was it online?

31:49 Dave Vutula: I don't believe so, unfortunately. All my materials are online, haven't been recording them. But Amazon's documentation was also kind of incorrect. And for those who had been doing skill development maybe for awhile or kind of tried their hand at it like a year ago, if you tried to do any of the audio stuff with Amazon's actual formal test suite that they have and their developer web app, it didn't work, because it didn't have this proper kind of unique context ID generation. So you just have to hold onto that. And then you need to hold onto the stream ID. There's certain things you can give to Amazon saying, you know, if you're doing a dialog with a user and you're not closing the session, user chooses, I think, you know, common example skills, or tell me your favorite color, and then you use that later on in the conversation. Amazon can hold that session based information. But once you start playing a stream, the session's gone. So it's on you to have a caching layer or database that says, okay, for this particular interaction they started this stream. So that way when you get the Stop or the Pause or the Skip, you know what it refers to.

32:54 Michael Kennedy: Okay, yeah, that's cool. It sounds challenging, but you can make it work.

32:57 Eric Cho: It's one of the newer areas for playing streams. So from day one, you always get the user ID and the session ID. So the session ID, obviously, just is good as the session goes. And the user ID, it's a string that associated with your Amazon account. So say if you use, have multiple like Echo and Echo Dot, you will get the same user ID for both devices when they launch the same skill. So later on, I think, it faces a challenge if you want to differentiate between Echo and Echo Dot, then you want to use the, there's a newer checkbox to say ask for a user's locale. And if you do that, then you actually get passed a device ID. And that's how you get by for identifying unique devices versus just a user ID.

33:37 Michael Kennedy: Right, if you have like one in your kitchen and one in the living room and the kids are messing with it in the living room and you're in the kitchen, like, you might want to differentiate between those.

33:47 Eric Cho: There's instances you want to have a frictionless experience between different devices that you have, as long as you have the same ID, like say, for example, if you enable a skillset for your one device, then you automatically enable it, because it associates your Amazon account. But there are other times when you need to differentiate between devices, because of device limitation. For example, Echo Show will show you little screen while the Echo itself doesn't. So there are different use cases for them. And because this is so new and Amazon's learning as we go, they definitely try to iterate based on that. And one thing that I would kind of just semi- sing the praises for Amazon is they do listen to developers, arguably, more so than Apple and Google and all the other platforms. That's how I feel about it.

34:32 Michael Kennedy: That's pretty cool. So let's talk about what Dave and Cam have brought up, this thing called Flask-Ask. So Flask-Ask, is that the A-S-K, Alexa Skill Kit is what the ASK stands for? Okay, cool. So Cam, tell us what Flask-Ask is.

34:51 Cam Sweeney: It's a Flask extension. It's made by this guy, John Wheeler, and it's a really cool Python package to get started with Alexa. Basically, he created, he provided some decorators with Flask, you know, you would route your view functions with @App.route. You'd do the same thing but it's with Ask. And then you basically just write your code as if you were doing typical Flask web app. You just have your view function. And when you return your response, it provides special response classes to either ask or tell the user. So you can like ask something and then expect a response back to that question. Or you can just send a message to the user. And it just makes it really simple to get going. And I've seen that, it's pretty cool, it's brought in a lot of people who are new to Python or programming in general or just diving in, which is pretty good for the Python ecosystem.

35:52 Michael Kennedy: A lot of people know Flask or they know a some Python web framework, which is super, similar to Flask, in one way or another. And if you can just write a Flask app, and instead of put the view decorator or whatever, the route decorator, you can just @ask.intent and it name basically the intents of your app, which is pretty cool. So it seems like it's really approachable. Dave, what would you add to it?

36:19 Dave Vutula: It adds templating as well for the dialogs and interactions with the user.

36:24 Michael Kennedy: I know what templating looks like in a website, like that's the HTML, but what's that mean in the context of a voice assistant?

36:31 Dave Vutula: It's extremely similar. So you can define basically the spoken portion of Alexa, when she talks back to you, she or it, or whatever you want to call it. And you can also use different plugable variables as well. So it's sort of like if you were building a web application, Flask, or Django, or any of the other Python frameworks. They typically have some sort of templating engine. Where you write your HTML, but then have some programmatic logic in there and do some dynamic substitution when it renders it. You can do the same thing with the spoken responses back. So it makes it a lot easier, because the big nicety of Flask-Ask, other than it fits right into the kind of Flask model of building web applications, is that it also deals with wrangling all the nasty JSON that you need to send back to Alexa.

37:20 Michael Kennedy: Yeah, and that's pretty awesome that you can kind of forget about that.

37:23 Dave Vutula: Yeah, you can take Flask-Ask, you can be up and running and never have to really... You have to know a little bit about the, sort of, how the API works, with the idea of the request and the responses, but you don't need to know the JSON format, which is pretty lengthy.

37:35 Cam Sweeney: The templating and stuff for the responses, what's also cool, is that it also allows for SSML. So you can kind of give like the actual voice response, some more kind of customization.

37:51 Dave Vutula: Yeah, like the inflections, the way you can kind of tailor how things are pronounced so it's not as robotic.

37:57 Michael Kennedy: Yeah, that's cool. So you can make it sound like it's a question, like, "Go to the store?" versus "Go to the store."

38:03 Dave Vutula: Yeah. I think some of that Amazon does pretty well by default. But for, you know, if you have the name of a product or something. I had a heck of a time with Vermont Public Radio Skills, just making it sound kind of conversational.

38:17 Michael Kennedy: I can imagine.

38:18 Eric Cho: A good thing for SSML is besides like you want to change the default behavior, like if you want to, instead of say cats, you want to spell out the C-A-T, that's where you invoke your SSML. They also have a bunch of what they call the speechlets. So that when you want to add more speechlets, but you don't want to worry about like encoding your audio into a specific format that Amazon likes. So, for example, you could have SSML go, "Wow!" or like, "hey, you just open a door", and making a door sound. Like, , that kind of door sound. If you want to play like a voice game. And that's exactly what you use SSML for is just use a little tag, like an XML tag and then you find out the list of ever growing list of speechlets that they have. And then you could start having interactions that way, without worrying, like I said, like, the biggest challenge for encoding audio for Amazon is the bunch of restrictions that they place to you, just because for their consideration and for speed of getting that file and play it back. For voice, you don't have the luxury of visuals, so you always have to short, concise and fast. So that's kind of cool that they have these, you know, I would say about 30 speechlets and, of course, they're adding in more every day.

39:30 Michael Kennedy: That sounds really cool. One of the things you made me think of when you're talking about your door and stuff is you could do a pretty awesome audio replacement of like a text-based game. You walk into the room and you see this, what do you want to do?

39:44 Eric Cho: Yeah.

39:45 Michael Kennedy: And like all those types of games like Leisure Suit Larry or the MUDs or whatever. You could probably have a really awesome little skill that is like that game, right?

39:53 Eric Cho: That is exactly the example they give. So if you have gone through some of the later, not the beginning, but the later like Amazon workshops and stuff, and that is exactly the example that we'll walk you through and the JSON example, I'm sorry, the JavaScript example that they give online that they publish open source, is the game that you interact with people, and especially kids, 'cause they don't have a lot of patience and they don't have a lot of wide vocabularies. So they use that as an example. So you open up a box, and do you either take a look at it? Or you close it right away. And then you wait for the kids to respond And then you'll go from there. So you have all these interactions that, like you said, the gaming aspect of it.

40:36 Michael Kennedy: That sounds pretty fun. You know, with this Flask-Ask thing it makes it so much it's like where Ngrok fits in. So basically you write your code as a Flask application, which, you know, you can run. It's going to run on local host on port 5000. But then in order to actually test and develop and debug that, you need to be able to let Amazon Services directly call that service, right?

41:03 Cam Sweeney: Right, yeah.

41:04 Dave Vutula: You could do some local testing, because it is a Flask application.

41:08 Michael Kennedy: I see. So if you know what to expect, you can like send it that over and over just through like Postman or a unit test or something, right?

41:16 Dave Vutula: Exactly, and you can do it programmatically in your unit test and you can always look at the response that comes back. But, I mean, from my experience, nothing, if you're going to submit something and not use it just for personal use, nothing beats actually using a hardware device.

41:30 Michael Kennedy: Cool. Is there a way to make like personal skills that your Alexa has that is not public?

41:36 Cam Sweeney: It's like associated with your Amazon account. Like, I think it's in development or something. That's what the skill is marked as. But do you guys know if that like persists or is there like a limit to how long you can keep it running privately?

41:52 Dave Vutula: I don't think there's a limit, 'cause I definitely have some old ones lingering that I haven't cleared out.

41:57 Eric Cho: Until Lambda starts to charge money, I will just keep all of my skills. And so you could, for sure, keep a skill in development. And, I think more recently, I don't know how long it's been, but definitely more recent than day one, is that you can start inviting your people to bets test that skillset. So you have their Amazon, I think either you get their email address associated with their Amazon account. And then you could submit it to a little page or portal to say I want to have my code test, best test, my skill. So that way I could share that skill without having to publish it in the marketplace.

42:31 Michael Kennedy: That's pretty cool. I can just imagine you might want to automate some stuff for you, but it's too specific.

42:37 Eric Cho: Yeah, once my grandma started turning on my living room lights, I would just like cut her off, right?

42:44 Michael Kennedy: That's right. If my robot lawnmower finishes and then goes in the garage, first open the garage. And then when it's in the garage, close the garage and then turn on the sprinklers. Like that's probably not a skill everyone wants. That'd be really cool to say. "Go mow the yard and then water it."

43:00 Eric Cho: You know what's super creepy is for the new Amazon Show, you actually have a drop-in mode. So they could actually call you like a Skype call with video without you knowing, I think. It has to be opt-in, but if you have two shows belonging to the same account, you could actually do that drop-in thing. And which is just super creepy. I mean, it's almost there as Amazon Keys. But, you know, that's another story, another day.

43:23 Michael Kennedy: Yeah, the Amazon Keys, where you basically give Amazon a key for the delivery people. Interesting.

43:29 Eric Cho: To third-party contractors for Amazon as well, so--

43:32 Michael Kennedy: That's right, not even Amazon.

43:34 Eric Cho: Yeah, exactly. But anyways--

43:36 Michael Kennedy: Quite interesting. Yeah, that's a whole 'nother level. So, Dave and Cam, you both contributed various things. Cam, let's start with you. What'd you do for Flask-Ask.

43:47 Cam Sweeney: Yeah, so Flask was like my first real step into the open source world. I started by just going through the code base and trying to document everything or like the dock strings and everything. That kind of just gave me a really good understanding of how the whole thing worked. And then, at the time, there was no support for audio streaming besides through SSML, which is... It's limited to like, I don't know, 30 seconds or a minute or something. Once Amazon announced like basically the audio streaming capability, I implemented basically the response classes for streaming like audio streams from some URL so that you just say return audio and then whatever. Dave came along later and really made that much more solid for working across with that whole session issue Eric was speaking of.

44:45 Michael Kennedy: Yeah, cool, Dave, how 'about you?

44:47 Dave Vutula: I basically built off of a lot of the groundwork that Cam had laid. So I found Flask-Ask when I first started doing skill development. And I used it as the basis for the streaming skill for Vermont Public Radio. And everything was working great and we went and pushed out kind of a testable version into Heroku. And as we were manually testing it, we found that every once in awhile, the stream would just sort of get interrupted or stop. After some debugging, I found out that it was because with running in Gunicorn, I never know how to pronounce it, G unicorn, goon-a=corn, had multiple sort of workers and one worker would retreat or respond to a request from Amazon. And then the other one would. And they didn't have any sort of shared state. They were just using kind of thread local storage. I think that's basically what the default behavior was at the time. So I had to find a way to get them to use some shared state to be able to solve the problem of starting and stopping the streams. And luckily all it required was digging into sort of Werkzeug, the underlying kind of underpinnings of Flask, figuring how that worked and conveniently there was a caching layer already there. So it was a matter of just kind of bringing that up into the Flask-Ask world, making it simpler.

46:02 Michael Kennedy: Yeah, that's cool.

46:02 Dave Vutula: Using the SimpleCache, I think is actual name. So it's as simple as that, where it'll do it in memory. And it solved the streaming problem.

46:10 Michael Kennedy: That's it, push across the different request threads, right?

46:12 Dave Vutula: Right, 'cause you can never guarantee who's going to respond to it. And if you did spin up multiple, let's say you did have a massively popular skill. Or maybe your skill is actually part of a larger application. It also just happens to be an Alexa skill endpoint. You might not even know which server responds to it.

46:29 Michael Kennedy: Interesting. So something that's similar to this, that you created, Cam, is called Flask Assistant, right? Tell people quickly about that.

46:37 Cam Sweeney: Yeah, it's basically just the Flask-Ask for Google Assistant. And rather than using the Alexa Skills Kit and the basically the whole Amazon ecosystem, it uses something called Dialogflow, which used to be called API.ai. And what that is is basically a NLP, a natural language processing platform, owned by Google. And so it's pretty analogous to Flask-Ask. It's got a very similar API and everything. And allows to integrate your... It's not called a skill for Google Assistant or API.ai. But basically your little voice app with things like Google Assistant or Skype or Facebook Messenger.

47:24 Michael Kennedy: Do they have to run in different processes? Or could I host both a Flask Assistant and Flask-Ask app in the same code on the same server?

47:31 Cam Sweeney: I actually haven't tried that. But it should be possible just by basically stacking decorators. And then one cool thing about Dialogflow is that Alexa is actually one of the integrations. So if you were to do it that way, you could basically export your project into the Alexa Skills Kit. But, I mean, if you're going to do that it makes more sense just to use Flask-Ask since it's--

47:52 Michael Kennedy: Right.

47:52 Cam Sweeney: Yeah.

47:53 Michael Kennedy: Yeah, and maybe you just run two processes on two different ports, or whatever. But, yeah, it's still pretty cool.

47:58 Cam Sweeney: Yeah, it's been fun working on that.

47:59 Michael Kennedy: We're getting sort of near the end of our time together. Let's talk about maybe a few higher level questions. First, maybe, Eric, you can go with this one first. How do you make money as an Alexa developer? So if I was working on an iPhone app, an iPhone game, I know how to make money there, or Android, just not as much per user. But, still, all right, you put it in the store, people buy it. You don't buy these skills. You just tell Alexa to install them and you go to your phone and install it, right?

48:26 Eric Cho: Yeah, that was my question from day one is like how do you make money from it. And so they recently announced a in-app purchase. So, essentially, you could make purchase just very much like what you do in like a iPhone app. But, I haven't, because it's so new I don't know the details on that. But currently you have two ways to make money, or three ways, I guess. So one is you could get Alexa credits, AWS credits if your Alexas go invoke charges. But since I tie mine into Lambda and currently the first million calls per month in Lambda is free. So basically it's $100 per month and it's month-to-month basis. So basically just use that to fund my other AWS usage, so that's pretty cool. And the second way that you can make money is you could be a top skill. I've seen people who post on their Twitter tweets that they make like $1100 per month of being top skills. But I don't know what the selection criteria is. So I can't say for sure like how to do it, or how not to do it, or what gets you there. But that's certainly another way that they've announced and you can make money from it. And the third way is basically just use Alexa as a front-end for your voice user interface. And you tie that into external account. And that's what the majority of the companies are doing, whether it's public radio, maybe they do charge people. Actually, in this case, they don't, but for Vermont Public Radio. But like say, Uber, for example, right? Then you use Alexa to order your Uber, or Domino's Pizza, which is a USB touching that you use that to order pizza and tie into your account. And then that you make money there. So increase your usage, that's a third way.

50:04 Michael Kennedy: Right, it's just a funnel, to an existing business model, yeah?

50:08 Eric Cho: Exactly, and I don't know, I don't think there's any studies. I'm sure Amazon's more than happy to tell you how much increase of usage that people increase or monthly spending on Uber or Domino Pizza, by 20% just by having your Alexa skill or what not. But I haven't seen any studies like that, so I can't say for sure. But the third way seems to be the most common for business today outside of just hobbyist, or some other companies.

50:32 Michael Kennedy: Right, I mean, Dave that sounds more like what you're doing. I know public radio doesn't necessarily directly make money, but increasing listenernship is a key goal, right?

50:40 Dave Vutula: Right, there's sort of two sides to this. One is being able to engage, in this case, since it's Vermont Public Radio, it's engaging listeners and building awareness and also helping drive contributions during fundraisers. So, obviously, having the ability, you're using the streams so you're delivering your product. In this case their live content and they're episodic content. And in doing so, they also have the ability to advertise and promote their own offerings. So that's sort of one approach where it's sort of more of a marketing channel. And I think in what Eric was saying is really sort of the, what I described, as like the post Walled Garden economy where you no longer get rich in the App Store within the Walled Garden. You really have to use it as a way to accelerate your business model outside of it and just meet the customer where they are. You know, if they're in their kitchen and they're trying to cut vegetables and corral a kid with one arm, being able to have the conversation with them over Alexa is sort of the way to meet them in their time of need.

51:42 Michael Kennedy: That's pretty awesome. The other thing I think we're touching on is these devices, except for mine, when I just turned off the microphone, so we could actually have this without being interrupted.

51:52 Eric Cho: Are you sure, Michael?

51:52 Michael Kennedy: It's generally constantly-- That's something that's a good question, right? These things are generally always listening to us but maybe they don't process everything listening, maybe they don't share everything they're listening, but, Cam, maybe you start first. What are your thoughts on the privacy around always listening devices.

52:08 Cam Sweeney: When you get one of these devices, you just got to be aware of that. And personally be okay with it. I'm not sure if Alexa provides this, but I know with the Google Home, you can like go to your account activity and see and listen to everything that it has recorded. And I know you can delete that. I'm not sure if Amazon is as transparent, but I think it's just something you got to accept if you're going to buy one of these.

52:36 Michael Kennedy: Yeah. Eric, what do you think?

52:38 Eric Cho: I think the answer is yes. So I know I have been going since through my Amazon or the Alexa app, and listening to what Alexa has, knows, about me, and deleting the voice bits and so on. But, of course, this is a big topic. And it's in the news recently, just because of the murder case. I forgot which state it was in basically. We'll probably include it in the show notes or what not. So I actually went out and looked at the official response from Amazon regarding this. You never know, like how much do you trust Amazon, right? Back to that Amazon Key issue. The official word is that they do a one-second buffering to detect a wake word. And then they constantly delete that one second buffering. So unless you hear one of the wake words in today' setting, is one of the four, right? You could choose to have Alexa, Amazon, Computer or Echo as your wake word. So they do that one-second thing to do Echo cancellation. And they do it to detect false positives. But the wake word, and then only if you speak the wake word, then you start recording, and so on. And obviously like you did, Michael, is to put on the mute button when you really don't want anything to, we don't want Echo or Alexa to participate in anything.

53:46 Michael Kennedy: Yeah, and Dave what do you think?

53:47 Dave Vutula: I've really got two sides to this. One is I'm most concerned about what Amazon or somebody else is hearing. But I do like to play around with it, 'cause I'll use funny voices. Like even with Comcast, they now have voice control in the remotes and I just try to see how good it can recognize the weirdest voice it can come up with. And it's shockingly good. And if they want to record that, feel free. They can keep that on a server somewhere. I'm more concerned about sort of the secondary kind of proliferation of all the connected things that people are going to run out and buy and plug into this ecosystem, because, you know, you look at the smarthome things, even just a smarthome outlet. That was like the big thing. I know my family went out and bought, last year, when we all got Echo Dots. Usually you have to sign up for a third-party service or something from that consumer electronics manufacturer, who's not skilled at securing a software-based environment. And that's what integrates with Amazon. So I'm less concerned about Amazon, and more concerned about all these kind of secondary vendors that are going to do a poor job and they're just going to create these holes in our homes. 'Cause, I mean, Amazon actually is pretty good at making sure even the media that you play, like the streams and everything, are done through a kind of a, it's kind of annoying, but it has to be a, I believe a POS-based encrypted connection. And it has to have the appropriate headers in the communication. So it's hard to even get media to play in an unsecure way via the Echo devices.

55:20 Michael Kennedy: Yeah, that's a good point. I definitely think the Internet of Things, the cheaper the device, the more likely you're going to have trouble with it, exposing you to things.

55:29 Eric Cho: Ask somebody who deals with DdoS the whole time, right? So like, I mean, we do thread intel. And, you know, of course the Mirai botnet that you heard about last year was all on IoT devices and so on. So this is a big concern. Instead of being an infected host with something that the user look at every day. It's now becoming all these ominous relatively powerful devices that's spread around like monitoring temperatures, right?

55:55 Cam Sweeney: Yeah, like aside from just, you know, the things you talk about, as this all progresses with all these different smart sensors you're activating or deactivating based on your daily routine, whatever entity is like in control of all this information, they can build a really good picture of what your life is like just by all these small little adjustments you make with your smart appliances and stuff. Like they can tell when you're home, or like when you cook and all these things. So it's something to be aware of.

56:27 Michael Kennedy: Yeah, how many people live in your house based on how many deep voices does it hear, for example.

56:33 Dave Vutula: But, remember, as they said, I think it was the NSA, after the whole Edward Snowden thing. It's just metadata. What are they going to do with it?

56:41 Michael Kennedy: That's right, it's just metadata, come one Come on, no problem. I don't see how that could go well. All right, very cool. Even all that stuff said, it sounds like most of us, maybe all of us have some kind of Alexa device that's generally on or more or less okay with it at least in limited parts of our life.

56:59 Eric Cho: Yeah, for me, at least it is. Yeah, I don't have any smart appliances outside of... I've tried them and then I unplug them, just to see how they work, but then I don't use them on a daily basis.

57:08 Dave Vutula: Yeah, and I've got my Alexas in both the first and second floor here and use them daily.

57:12 Michael Kennedy: They're really, really nice. All right, well, I guess we're pretty much out of time. So I'll have to leave it there for the Alexa stuff. But let's go down the two questions. So, Dave, we'll go with you first. Favorite editor?

57:25 Dave Vutula: I can't make up my mind. I either use Vim or Emacs, depending on the situation. And my hands are in constant pain as a result.

57:32 Michael Kennedy: Cam?

57:32 Cam Sweeney: Sublimey, it's just so quick and nice.

57:37 Michael Kennedy: And, Eric, have I corrupted you?

57:39 Eric Cho: Yes, you have. So I used to use Vim. But then since I listen to Talk Python too much and so now I use PyCharm exclusively.

57:45 Michael Kennedy: That definitely, love it as well. All right, and, Eric, keep going with you. How about a notable PI API package?

57:51 Eric Cho: So I like Requests, as, of course, half of the people here I think that should be in the standard library. And if Ansible counts, then that's definitely what I would like as well, the library/packages.

58:02 Michael Kennedy: Yeah, I think it does. That's cool, Ansible. All right, Cam?

58:05 Cam Sweeney: So aside from Flask-Ask and Flask Assistant, if anyone's interested in making their own skills or anything, or just not even skills, but just programs to control things within their house, I would check out Home Assistant. It's a really cool project.

58:19 Michael Kennedy: It's a very cool project. It's controlled so many devices. It's a really cool like on your own network website. And, yeah, I had the guys on on Episode 122 a while back. So definitely cool. Dave?

58:31 Dave Vutula: You can't beat Requests. I was going to say that.

58:35 Michael Kennedy: Yeah, awesome. Okay, so I agree. Requests is definitely the most popular one on the show and out in the world. Final call to action, people want to get started. They want to get started with Alexa, they want to get started with Flask-Ask, things like that. What do they do? Just jump in, you guys.

58:50 Eric Cho: Yeah, I think they could just go. There's a bunch of templates, premade templates and step-by-step guides. Like I said, Amazon's very involved in reaching out to potential developers. So you could get a lot of freebies that way if you publish your skillsets.

59:02 Cam Sweeney: Good to go, some of the tutorials for Flask-Ask can get started. It's not too hard.

59:06 Dave Vutula: There's a bunch of sample projects. Each one of them I did some work in making sure that they're sort of sanity checked with each version. So they should actually work. And they'll show you how to use things like Flask blueprints with Flask-Ask. They basically recreate some of the traditional Alexa Skill Kit demo applications as well.

59:26 Michael Kennedy: Well, it sounds really fun and I'm definitely looking forward to building something that I can talk to Alexa about. Just not sure what yet. Thanks for being on the show, everyone.

59:34 Eric Cho: Awesome, thank you

59:34 Dave Vutula: Thank you.

59:36 Cam Sweeney: Yeah, thank you.

59:36 Michael Kennedy: Yep, bye. This has been another episode of Talk Python to Me. Today's guests were Eric Cho, Dave Vitula, and Cam Sweeney. And this episode has been brought to you by Datadog and us at Talk Python Training. Datadog gives you visibility into the whole system running your code. Visit talkpython.fm/datadog and see what you've been missing. They'll even throw in a free T-shirt for doing the tutorial. Are you or a colleague trying to learn Python? Have you tried books and videos that just left you bored by covering topics point-by-point? Well, check on my online course, Python Jumpstart by Building 10 apps at talkpython.fm/course to experience a more engaging way to learn Python. And if you're looking for something a little more advanced try my Write Pythonic Code course at talkpython.fm/pythonic. Be sure to subscribe to the show. Open your favorite pod catcher and search for Python. We should be right at the top. You can also find iTunes feed at /iTunes, Google Play feed a /play and direct RSS feed at /rss on talkpython.fm. This is your host Michael Kennedy. Thanks so much for listening. I really appreciate it. Now get out there and write some Python code.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon