Capturing audio from the microphone

I’m trying to write an app that will capture audio from the microphone and send it to the server for analysis. So far I’ve got this
Spoken language identification

However, calling js.call('getUserMedia',{'audio':True,'video':False})
which is supposed to connect to the microphone and return a stream fails with the following error message:

NameError: Could not find global JS function 'getUserMedia'. at [Form1, line 16](javascript:void(0))

Can anyone suggest what I should be doing here?

With a bit of research and experimentation, I’ve managed to work out the answer to my own question.

The call I needed was
js.window.navigator.mediaDevices.getUserMedia({'audio':True,'video':False})

4 Likes