WebAIM - Web Accessibility In Mind

E-mail List Archives

TapTap - an experiment in JavaScript using Audio Patterns to trigger Events in a Web Browser Window

for

From: Robert Jones
Date: Jan 28, 2014 8:41AM


I have been experimenting with monitoring user audio input in a browser
window using the Web Audio API.

I am interested in deteecting specific audio patterns, like a hand clap,
that can then trigger some other event in the browser.

Think of it as a high tech version of the 'As Seen on TV' gadget The
Clapper :^)

There might be an application of the approach in assistive technologies, so
I would welcome any thoughts that the list might have


My primary interest is using it to trigger a Google Speech Recognition
session without having to click a button with a mouse.

The initial audio pattern that I have been using consists of two sharp taps
on a desk with a fingertip or a pen, or a pair of handclaps.

I have two Proof of Concept demos up and running

https://html5-examples.herokuapp.com/taptap_experiment1.html
- Listen for the signal and trigger display of a div

https://html5-examples.herokuapp.com/taptap_experiment2.html
- Listen for the signal and trigger a Speech Recognition session

NOTE you need to be running a recent version of the Google Chrome or
Firefox browser for #1 and
you can only run #2 in Google Chrome

The code is pretty rough right now and I intend to refine and package it
into a JavaScript library.

I would welcome any comments at this early stage

thanks

--Rob Jones Craic Computing, Seattle