Infrastructure for speech recognition in JavaScript