JavaScript helper for speech recognition.