Sometimes you come home after a long day of work and really wish you had your friends to tell jokes and cheer you up, but they aren't available. Now Alexa and Watson can team up as a comedy duo to help you relieve stress with bad jokes!
What it does
Watson has the capability to analyze the tone in sentences the users provides. Alexa acts as the conversational interface which users can talk to. Alexa forwards the prompt the user provided (to invoke the alexa skill we created for our project) to our node.js server which sends it to watson to be analyzed for tone. When the node.js server receives the response from watson, it will select a joke based on the tone of the user 's prompt, and send it to alexa to tell the joke to the user.
The second feature we got working was the ability for two amazon alexa/echo's to prompt each other for jokes in a continuous feedback loop.
How I built it
The first step was getting the node.js to send the request to the watson tone analyzer api and just display the tone analyzer data dump. The next step was deploying the basic server to an accessible IP so that our alexa skill could ping the deployed node server.
After that it was a matter of setting up the jokes so that it would say a appropriate joke based on the tone on the prompt. From there Alexa says the joke and laughs to herself.
Challenges I ran into
Setting up the request on the node server to work with my bluemix credentials, I had a curl request to work off of but translating that into a node.js request proved harder than expected.
There were also some issues setting up the alexa skill due to the asynchronous nature of it's callback structure.
We also spent a lot of time setting up the 2nd echo on our raspberry pi which proved to be a real challenge.
Accomplishments that I'm proud of
The experience of using the alexa/watson comedy duo is really fun (maybe because we tested while sleep deprived), but it's hilarious to hear alexa tell a really bad joke in a deadpan voice and then laugh to herself about it.
What I learned
I learned how to wed significantly different web services in real time using a conversational interface.
What's next for Alexa Watson Comedy Duo
Having a more robust conversation between the two amazon alexa/echo's, as it stands the first echo will just prompt the second for a joke after laughing at it's own joke and the cycle will continue back and forth. Without much of a real conversation between the two, if the 2nd alexa laughed at the first one's joke etc. it would feel like a much more robust conversation.