使用getUserMedia()同时录制来自多个麦克风的音频 [英] Recording audio from multiple microphones simultaneously with getUserMedia()

查看:239
本文介绍了使用getUserMedia()同时录制来自多个麦克风的音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用 getUserMedia()同时访问不同的麦克风?

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

这应该是有用的


  • 滤除背景噪音;

  • 创造某种立体效果;

  • 为国际
    流媒体会议提供多个音轨。

显然,它是视频源非常棘手:
使用getUserMedia从几个网络摄像头捕获视频

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.

推荐答案

你应该可以做到这一点,但我认为浏览器的支持会让你失望。

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

你应该能够使用getUserMedia时,通过指定麦克风ID创建多个媒体源。您可以使用MediaDevices.enumerateDevices()找到所有连接的媒体设备的ID

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()

一旦有两个单独的麦克风输入,您应该能够使用AudioContext获取数据。

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.

这篇关于使用getUserMedia()同时录制来自多个麦克风的音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆