voxable / spree-api-ai-demo

A demo of using the Web Speech APIs and Api.ai to add a voice interface to the Spree e-commerce appplication

Home Page:http://voxable.io/blog/2016/04/04/adding-a-voice-interface-to-a-web-application-video/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Api.ai + Web Speech API demonstration

This is a demonstration of using Api.ai and the Web Speech APIs (via the excellent SpeechKITT library) to add a voice interface to a web application. In this case, that application is the Spree e-commerce platform.

You can watch a presentation of this demo on YouTube.

Getting started

In order to get this up and running, you'll need an account at Api.ai. Create a new agent, and upload the entities and intents found in app/assets/voice. Then create a .env file and add the following line:

API_AI_CLIENT_ACCESS_TOKEN=

Be sure to add your agent's client access token to the right of the =, obvs.

From there, it should just be the normal Rails app setup rigamarole.

How it was accomplished

Check out the diff between the demo and master branches to see what was done.

Why CoffeeScript?

Great question! You're a smart one. The rest of Spree happens to be written in it, and the purpose of this exercise was to make-believe that they had hired Voxable to add a voice interface to their product. Rather than convincing them (and charging them) to completely rewrite their front-end into React in ES6, we fit the interface into their existing technology stack - the one their team is already familiar with.

About

A demo of using the Web Speech APIs and Api.ai to add a voice interface to the Spree e-commerce appplication

http://voxable.io/blog/2016/04/04/adding-a-voice-interface-to-a-web-application-video/


Languages

Language:Ruby 95.4%Language:HTML 3.9%Language:CSS 0.4%Language:JavaScript 0.3%