Using microphone on raspberry pi


I am running an web-app under electron on a raspberry pi 2 and it needs to use the speech recognition API. This works fine using the Chromium-browser, but when running under electron I don’t appear to get any input from the microphone. With the chromium-browser, I am able to use the media preferences to select the microphone to use, but under electron I don’t know how or if it is possible.

Is there a config option or some debug options that would allow me to further debug this?


I have played some more with this and it appears that the microphone will work if I start the electron process under ‘sudo’. I don’t see any messages complaining about permissions when it isn’t working.


Could you share the code for the above project?