Hacker News new | past | comments | ask | show | jobs | submit login
An Easier Way to Build Alexa Skills Using Python (amazon.com)
167 points by happy-go-lucky on June 29, 2018 | hide | past | favorite | 41 comments



If you care about your privacy, you can also build your own 100% on-device Voice AI for free using https://snips.ai (disclaimer: I'm a co-founder)

We are building an open-source and 100% private-by-design Voice AI platform, and you can code your first private assistant in less than 1h: https://medium.com/snips-ai/building-a-voice-controlled-home...


The platform looks interesting, but the fact that you're offering an ICO makes me immediately wary of your company.


I tried Snips for a bit the other day on my Raspi 3, and it worked as advertised, detection was great, making skills was simple, and it's much better than Alexa in that you don't have to say "tell <app> to <command>", the entire namespace is immediately available. It's all that I've wanted from such a device.

I do agree, however, that the ICO makes the whole thing feel scammy. It's a terrible idea, I guess they got lured in by the promise of free money and shoehorned a token into their app.


Agreed.

The true crypto use case - raising money without consequences. A shitty use case, but one none the less.


gah, what the heck is wrong with that woman's head on the homepage. Nightmare fuel.


That is... bizarre. It looks like they had a simple head originally and then attached it to a too large body (facing the wrong way), and then tossed some hair on it to not look like it was a sockless handpuppet coming out of the neck


Looks like the video got vertically squished?


As I said downstream, I tried Snips and it's great, so I hope it catches on. Everything works as advertised, it sends all recognized commands to MQTT so integration with anything else is pretty much instant, and detection works well.

I thought of buying the hardware to make the Snips device (to support the company financially as well), but I realized that I use my Echo mostly for Spotify (as it's a bit too crippled to use for much else), which Snips wouldn't be able to support.

I still might get/build one for all the home automation I can't use the Echo for, but a big use case is immediately removed if it can't play Spotify.


I own several Echo devices and programmability of Alexa devices just baffles me.

There is still no way for a skill to read notifications. For example - I want to write a calendar notification app which unifies all calendar events across several sources and there is just no way to do it. It is of course disabled in the name of privacy which I can understand - but I don't understand how I can't enable this for a device that I own from an app I write.

Similarly - I was considering getting an Echo Show for keeping a persistent view of my todo list and upcoming things on Echo show. I looked at writing skills for Echo show. Something that should be a webapp that just renders a particular source or something similar. But nope - It just looks hard or impossible.


The Echo Show is a horrible disappointment. I got one when they were released in the UK because it seemed the perfect thing to keep in the kitchen, but it’s crippled beyond usefulness.

My primary use case was going to be watching Netflix with voice control. Netflix has yet to appear on the Show, and because of Amazon’s zealot like insistence that everything be driven by a voice UI there’s no web browser or app support. The thing is clearly running some version of Android, I wish they’d just bite the bullet and throw FireOS proper on there.


That is strange. Especially considering the original echo has a volume ring on the top for manual volume adjustment. I'm surprised the echo show is voice only and doesn't include a touchscreen. Thank you for the heads up.


To clarify the Echo Show does have a touch screen, but they may as well have not added it for all the use it provides.


It really is too crippled. I wanted to have my various home devices send me notifications (e.g. "3D print finished successfully"), but Alexa just cannot do it. I didn't even want it to spontaneously start saying things, flashing the light until I said "what's up, Alexa?" or something would be great, but nope, nothing.

I really hope Snips catches on, as it's much, much more hackable.


Question: are you trying to read Android notifications? Or perhaps read Alexa notifications? I would think you can pretty easily write a skill to feed you a unified calendar (you'd need to do the calendar unification on your own server, though).


Can you use a mobile app as a conduit? Central server Alexa pushes to and polls from, mobile app similarly but has permissions for calendar to do actual work? I know it’s contrived but seems like a reasonable approach.


Flask-ask makes it pretty easy.

https://github.com/johnwheeler/flask-ask


Also flask-assistant is the google assistant version which (IIRC) was inspired by flask-ask.

https://flask-assistant.readthedocs.io/en/latest/quick_start...


I recently contributed to Flask-Ask and have been developing apps for Alexa for a while now. The APIs/Boilerplate code for the `easier way` is definitely harder than Flask-Ask is right now.


Yes! I recently adapted a project of mine to be available as an Alexa skill, and it only took ~40 lines to get it working [0].

0: https://github.com/ssaamm/pun-generator/compare/24188aceb3da...


I agree, I've used this package since the beginning. Python is my favorite computer language so far. I started with Flash, then HTML & CSS, then jQuery, PHP, MySQL, etc. Could not mention Python without Virtualenv, Django, and Flask. To me, these tools are like LEGO for programming. I like JS too, who wouldn't? People literally live on the internet.


Played with this. It is stupid easy to make apps for Alexa with Flask-Ask.


Thanks!


oof. Their getting started doc[0] has you create a virtualenv called "skill" then asks you to create your project in a folder called "skill". I can't imagine the confusion that's going to ensue.

[0] https://github.com/alexa-labs/alexa-skills-kit-sdk-for-pytho...


Definitely going to give this a try over the weekend. I bailed pretty quick a few months ago when I wanted to build a spelling bee skill for Alexa in Python. It was a total joke--terrible docs, cumbersome API and just simply not fun. Hoping this is a step in the right direction.


Have to agree. Even the code examples for some of the skill types aren't examples of using the API, they're examples of things like migrating existing code to a newer version of the API, which means much of the code is not only hard to read but irrelevant.

And the Smart Home skill APIs are very different from the normal skills, so most of the tutorials that are available don't help much.

Lambda is required as a back-end for Smart Home skills, but must still be set up manually which means copying and pasting things back and forth between completely unrelated management interfaces, some on AWS, some on Amazon Developer Services.

User authentication is required for Smart Home skills, but after checking the configuration very carefully and still seeing the auth step fail in the Alexa app even though the OAUTH calls succeeded, with little to no visibility into why it failed, I stopped wasting time on it.


Would be nice if there was a VPN mechanism for Lambdas such I could securely connect to my home network from them... perhaps port knocking or the single-packet equivalent... I don't want to open my listener to the world when I already have a suitable UDP based thing going on with VPN.......

EDIT: woops... maybe you can? https://stackoverflow.com/questions/46329464/can-an-aws-lamb...


Use Flask-Ask and Zappa and deploy to AWS Lambda. I use that setup and have been running for free on AWS infra for about 6 months now.


oh i guess i didn't explain my use case enough... i'll deploy to lambda, but then i want lambda to ask about or control things around my house


Not sure if I understand what you're after, but AWS offers private API Gateway's now


Echo <-> Lambda <-> ?? <-> Home Network

For ?? I've tried just making the lambda directly connect to an open port, but this requires me to open the router to quite a large range since lambdas don't have static IPs.

I'd like a VPN in ?? I have that for my phone.

As I dig into VPC and such it seems like it almost requires an EC2 endpoint for me to VPN into from my network which will NAT the request?

I'd like to not have to pay for an EC2 instance.


You should be able to setup a vpn from aws to your home. The lambda can be assigned to the vpc, then you setup a virtual private gateway, a customer gateway (which points at the public ip of your home vpn endpoint),and a vpn connection. If you dont have bgp for routing, then you'll need to setup the static route on the subnet the lambda was assigned to. I havent done this exact thing before, but it should work.


This should help you: https://gist.github.com/reggi/dc5f2620b7b4f515e68e46255ac042...

Once you have your lambda running inside a VPC, you can assign an elastic IP to the VPC. You don't need an EC2 instance, but you will need a NAT gateway, which is billed at similar levels to a small EC2 instance anyway.


Hrmmm perhaps I'll just have to develop something with single packet encrypted port knocking perhaps. ~$36 a month is out of mine price range for something that is like 100k bytes a month (say having an Echo skill that can control Home Assistant)...


Can’t you open up a SSH-tunnel from the lambda? I think there are Python clients if OpenSSH isn’t available in lambda instances (anyone know which binaries are available? I suppose it’s a quite barebone Linux container)


I guess I don't want a socket listening. If AWS would publish their subnets maybe I could limit it to those addresses. It sure seems like they could keep their subnets dynamic and accommodate something like this but I guess not.



Nice! Okay hrmmm


Not sure about lamba, but the Firebase equivalent can make outgoing requests. You can setup challenge/response auth and then have a gateway controller in your network using that.


ngrok.com


that requires a fourth party involved


After banging my head trying to get access to start using Amazon's product advertising APIs and product matching info APIs, I'd like to politely say: screw Amazon.

If you keep slapping away developers on one end, then don't expect us to get excited about building things for your products on the other end.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: