javascript 在浏览器中进行语音聊天?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6992507/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 22:37:31  来源:igfitidea点击:

Voice chat in the browser?

javascriptbrowsernode.jsvoice

提问by fancy

We are looking to implement a group -voice- chat in the browser using node.js on the server. Is this possible?

我们希望在服务器上使用 node.js 在浏览器中实现群组语音聊天。这可能吗?

采纳答案by yojimbo87

If you want your solution to be purely JavaScript based on both, server and client side, then you would probably have to wait for the WebRTC, Device APIor media captureAPIand then implement node.js backend for it.

如果您希望您的解决方案是基于服务器端和客户端的纯 JavaScript,那么您可能需要等待WebRTC设备 API媒体捕获API,然后为其实现 node.js 后端。

Other than that it is, I would say, a question of Flash oriented APIs on the client side (for accessing devices such as cameras or microphones) and some kind of interoperability with node.js backend in case you don't want to take advantage of Flash Media Serveror Red5.

除此之外,我想说的是客户端面向 Flash 的 API 的问题(用于访问相机或麦克风等设备)以及与 node.js 后端的某种互操作性,以防您不想利用的Flash Media Server的Red5的

回答by Michael Dausmann

I'm researching and working on the same problem.

我正在研究和解决同样的问题。

This is my proposed stack:-

这是我建议的堆栈:-

capturing voice on the client https://github.com/jiehanzheng/Recorderjs/blob/master/README.md

在客户端截取语音 https://github.com/jiehanzheng/Recorderjs/blob/master/README.md

encoding the captured speech so that it can be shared via Node https://github.com/jpemartins/speex.js

对捕获的语音进行编码,以便可以通过 Node https://github.com/jpemartins/speex.js共享

sharing voice data with multiple users node.js and socket.io

与多个用户共享语音数据 node.js 和 socket.io

Somebody wrote a THESISon this. good read but some missing code in the samples http://pure.ltu.se/portal/files/36285511/LTU-EX-2012-36247736.pdf

有人写了一个论点这一点。读得很好,但示例中缺少一些代码 http://pure.ltu.se/portal/files/36285511/LTU-EX-2012-36247736.pdf

relevant question on so. in particular look at answer by sirjamm How to Call SPEEX Audio Decode/Encode in HTML5 / JavaScript (Without Flash)

相关问题。特别是看看 sirjamm如何在 HTML5/JavaScript 中调用 SPEEX 音频解码/编码(无 Flash)的回答

If I get it working, will post the github ref here.

如果我让它工作,将在此处发布 github 参考。

hth