Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recording audio from multiple microphones simultaneously with getUserMedia()

it is possible to access different microphones at the same time using getUserMedia()?

This whould be useful to

  • filter out background noise;
  • create some sort of stereoscopic effect;
  • make available multiple audio tracks for an international streaming conference.

Apparently, it is quite tricky for video source: Capture video from several webcams with getUserMedia

I was wondering if, for the audio source, the problem was different.

like image 207
leonard vertighel Avatar asked Feb 18 '15 11:02

leonard vertighel


People also ask

How do I record multiple microphones at once?

Use a digital recorder. You can purchase an audio mixer or a digital recorder that lets you plug multiple XLR mics and record individual audio tracks. This setup is excellent for recording both in podcast studios or at home, but it is incredibly versatile in its applications.

What happens when you use multiple microphones on one sound source?

Phase becomes a problem when multiple microphones record a single source, and the sound reaches each mic capsule at a slightly different time — the combination of slightly out of time mic signals results in cancellations and reinforcements that change the tonality of the recording.


1 Answers

You should be able to do this but I imagine the browser support will let you down somewhere along the line.

You should be able to create several media sources by specifying a microphone ID when using getUserMedia. You can find the IDs of all connected media devices using MediaDevices.enumerateDevices()

Once you have two separate microphone inputs you should be able to get the data using an AudioContext.

Then it's a case of doing what ever you're doing to the bit data before it's output to the browser.

This is all very high level and the details of the actual implementation would probably take quite a long time to figure out but as for your question: Yes, it should be possible if browser support is there.

like image 139
michael Avatar answered Oct 06 '22 00:10

michael