The features of Pocketsphinx.js are tightly related to the features of PocketSphinx. There are, however, some specifics related to the browser environment.
- Calls can be made through Web Workers or not,
- Supports all acoustic models supported by PocketSphinx,
- Supports most of the command-line parameters of PocketSphinx,
- Support for Statistical Language Models or JSGF grammars input from files,
- Support for Keyword spotting,
- Optional audio recording library for real-time recognition.
PocketSphinx.js comes with an audio recorder that can be used independently for any audio-related web application. It is based on the Web Audio API and WebRTC. Its features include:
- Works on Chrome and Firefox,
- Audio resampling inside a web worker, without loading the UI thread.
If you're interested, take a look at the documentation.
The library can be tested on the Live Demo page. It provides a simple API which is fully documented in the source code repository. We also have a live demo in Chinese on the Live Demo page in mandarin, and another Live Demo for Keyword Spotting.
Using the library for real-time recognition implies using bleeding-edge Web technologies that really are just emerging. A general introduction of these technologies and their current status can be found in this overview of audio in the browser.
There is a live demo here, one in mandarin Chinese here, and a demo of keyword spotting. It works on Chrome and Firefox as live audio capture uses parts of the Web Audio API that are currently only available in these browsers.