We wanted to do something interesting with Alexa, so we decided to make a skill. We noticed that while you can use Alexa to stream movies and music to your TV, you can't control your computer's laptop with it. So we decided to make this system!
What it does
Using your Echo/other Alexa, load the skill and speak:
> Alexa, open browser navigator. Welcome to browser navigator. > Alexa, go back. Going back. > Alexa, load Facebook Loading Facebook. > Alexa, search for latest news Loading Google search results. > Alexa, biene? Biene!
You get the drill. An extension installed on your Chrome browser performs the actions you give it.
How we built it
The system uses four main parts: An Alexa skill, an AWS Lambda function that handles the skill, a webserver, and a Chrome extension.
The Alexa skill simply allows the user to dictate commands, and the Lambda function processes these. The function then sends the command to the webserver (in a HTTP POST request). This webserver runs a Socket.io server, and when it receives a command from the Lambda function, it emits an event to the Chrome extension containing the command. The extension receives this event, processes the command, then runs it on the current browser tab.
Challenges we ran into
- Lambda is a little slow to update DNS, so we couldn't see our webserver for a few hours.
- Chrome doesn't have a lot of documentation for extensions...
- None of us used Scalingo before, so took a little time to set up.
Accomplishments that we're proud of
- It works!
What we learned
- How to write Alexa skills
- How to make Chrome extensions
- How to use websockets effectively
What's next for Chromelexa
- Multiple user support (using a signin system, or something like google accounts?)
- More commands
- More flexible speech input
- Nicer interface
- Web dashboard