News for hackers. Stuff that matters.
Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @02:48AM (#11820799)
"Amazon Alexa skills JS API...There isn’t really any alternative right now..."

I want to take this opportunity to plug an Alexa Skills Kit API (in Python) I just dropped:

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

It does a lot of things the JS API doesn't: Jinja templates, decorator-based intent routing, slot defaults/conversions, and request signature verification to name a few.

Re:Open Source Speech Recognition by jamornh on Thursday June 02, 2016 @05:08AM (#11821202)
I was just looking for something like this, and as of yesterday I only found this project: https://github.com/anjishnu/ask-alexa-pykit

Yours look much simpler to get started, would you care to comment on what the differences are between yours and the project I just posted?

Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @05:50AM (#11821333)
Yes!

I just put mine up a month ago - not discoverable for "Python Alexa" or any keywords. Working on it :-)

So for the differences -

Alexa Skills are deployable as AWS Lambda functions or behind HTTPS. Currently, ask-alexa-pykit works on Lambda and Flask-Ask implements the signature verification required for HTTPS deployments. (i.e. Flask-Ask works on your own HTTPS server or Lambda).

Another difference is in the intent mapping design. Flask-Ask is based on the same architectural patterns of Flask with context locals, parameter mapping / conversion, and of course, Jinja templates!

For example, Mapping an intent with ask-alexa-pykit looks like this:

http://pastebin.com/raw/hQJLKnHL

Flask-Ask is like this:

http://pastebin.com/raw/9fWrGNYY

Flask-Ask also converts slots like firstname from the example above into arbitrary datatypes, and has stock conversions for AMAZON.DURATION (e.g. 'P2YT3H10M' into a Python datetime.timedelta). Full parameter mapping docs here: https://johnwheeler.org/flask-ask/requests.html#mapping-inte...

Flask-Ask templates are grouped together in the same files since utterances are typically small phrases--to make them easier to manage. Templates are of course an optional feature but are encouraged!

It's still very early, but I'm working my butt off, full-time on it! I have a 5-min tutorial that shows how to get up and running with Flask-Ask and ngrok: https://www.youtube.com/watch?v=eC2zi4WIFX0 - The API has changed a little, if you try it out and have any questions, you can do an issue or hit me up! john at ! johnwheeler.org

Thank you!

Re:Open Source Speech Recognition by jamornh on Thursday June 02, 2016 @09:59AM (#11822467)
Thanks for the detailed reply! I've been interested in the echo and wanted to get into it for a while so I'll definitely dig into flask-ask and try to get up and running with it.
Re:Open Source Speech Recognition by edraferi on Thursday June 02, 2016 @08:18AM (#11821871)
That video was great! Just started thinking about Alexa, this looks like an easy way to get moving with it.
Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @12:55PM (#11824075)
Thank you!
Re:Open Source Speech Recognition by dozzie on Thursday June 02, 2016 @04:18AM (#11821070)
OK, you have written an API. When can be expected that you publish a code for a service that implements this API?
Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @04:32AM (#11821106)
Hi dozzie!

Please check out the samples directory for client code:

https://github.com/johnwheeler/flask-ask/tree/master/samples

These are direct ports from the Java samples:

https://github.com/amzn/alexa-skills-kit-java/tree/master/sa...