I just came across pocketsphinx in 100% javascript! See this repository: https://github.com/syl22-00/pocketsphinx.js.
Would it be an idea to use that instead of the c-version: it cuts down on dependencies and might increase usability and ease-of-use tremendously