With Cortana and Alexa becoming BFF's, today's project from Michael James seemed appropriate.
The cool thing about Michael's post is its format. Michael takes you along on his journey on learning how to create an Alexa skill, including all the bumps in the road...
Tonight I decided to try out something new that I had been meaning to for a while rather than continue poking around on my app.
Since Alexa's release I've been itching to play with it, I decided whilst I was learning one thing why not learn three things so decided to use AWS Lambdas with .Net Core as well.
I've used AWS extensively with work but never used Lambdas although I was aware of them and knew they were similar to Azure Functions, Ben Godwin's show on .Net Rocks also convinced me it was time to give them a proper look.
.Net Core I've also played with and had some great training from the .Net Core guys at NDC London from this year but I've never published anything. Tonight this was all going to change :)
A quick note before I continue, I'm writing this as I go so a few things might feel disjointed but hopefully it will all make sense.
First Steps - 1st Hour
In order to get going I set my self up a personal Amazon account, you can go do this..., once here I decided to get the Lambda setup sorted as I knew from my basic reading Alexa Skills can call out to these or a HTTPS endpoint. Lambda's are much easier than a full HTTPS stack.... well that's pretty easy now but lets not go there yet.
Baby Steps - Hour Two
AWS Lambda is working (well kinda) now to hook up Alexa and begin to change the world. Now Alexa is not found within VS, instead you need to access it via the web portal so goto https://developer.amazon.com/edw/home.html#/skills.
I'm still in Alexa Land - Hour Three
So playing with the Alexa Skills Builder took longer than planned but I believed I had something that might work , it compiled the model so it can't be too bad.... , anyhow the next step is configuration which sounds and looked like it should be easy.... I got stuck here for a little while :(
Voice Simulators are Fun... - Hour Three and a bit to Four
I finally got to the fun bit where I could see how my sample skill was going to pan out.
Let's do this - Hour 4- 5
So I had my classes thanks to paste as JSON so it was time to play with the function to return something meaningful.
Testing with Alexa
Up to this point all of my testing has been via text entry into the simulator, no voice input. Now I wanted to see how it worked in real life. Unfortunately I don't yet have an Echo Dot or an Echo but I did find a website you can use instead. https://echosim.io/ allows you to log into your Amazon account and test your skills via your browser and your microphone.
Now at this point we have a basic Alexa Skill working pretty much end to end. Pretty awesome for a few hours dev, most of the time has been in wiring everything up and understanding the JSON schema's but its very powerful and I can see this turning into a full R&D task for my work and hopefuly become a product feature. I didn't think this evening I'd get anywhere near as far as I had, having basic voice and card responses is pretty awesome.
Now there's tons of scope that can be added to skills, you can make them more interactive , allow Alexa to provide further details, audio files and all sorts but this has hopefully provided a little insight on how easy it is to get started with Alexa and you don't even have to host the service endpoints yourself if thats a blocker to get started.