Building conversational interfaces in Drupal

I know Dreis caused a lot of smiles when he used Amazon Echo and Drupal 8 to be notified about “Awesome Sauce” going on sale. The future is bright and requires increasingly more ways of engaging with technology. But what if you wanted to start to have a conversation without Echo to do it? What if we wanted to progressively enhance the browser experience to include lessons learned from conversational input technologies.

If you haven’t heard of it before, welcome Annyang and the Web Speech API native in many browsers (Chrome / Opera it’s enabled by default too). Annyang is a simple wrapper library for the Web Speech API. This lets you use simple phrases as the trigger for a javascript callback to fire. Using well formed ones, you can effectively wire voice based commands into anything on the web.

While looking for something that implements annyang, I stumbled on the Voice Commander module. It didn’t do everything I wanted, but it’s a great starting point since it integrated the library and processed menus. What I show in the video below is a fork of voice commander which is core in elmsln, allowing you to start speaking lots of options. I show this in the context of one of our production systems where I’ve done the authorization clicks. Browsers will ask if your microphone can be turned on (so no, this isn’t NSA stuff).

Right now we have support for going to systems, scrolling, going into edit mode, next / prev in a book, browser history forward/backward, common menu items. In the future I’m looking to add a more conversational engine using the other side of Web Speech that allows browsers to talk to you in their nature “voice”. A proof of concept of that called ELMSLN AI is in the links section. Enjoy talking!