Question

I am trying to develop an app that continously listens through the microphone, using HTML5's getUserMedia. It will continuously listen to the user's words and transform the audio into text (through PHP, using an Speech-to-Text API). My problem is with firing a certain event, when the user stops talking (NOT stopping the recording, just sending the result phrase to analysis - the recording is continuous). So, to put this in other terms, how can one get the sound level from the microphone through getUserMedia (or another non-Flash alternative)?

Was it helpful?

Solution

on getUserMedia, what you are getting on success call back is a media track object. You can see all the properties available in the MediaTrack here: https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack

To explore further on the quality, you may have to read the success callback stream and do some custom checks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top