用麦克风录制音频并将其发送到服务器的最佳方式
我知道有类似的问题,但没有给我答案。
在网站上使用麦克风录制音频并发送到服务器进行某些操作的最佳选择是什么?
1) java
/javascript
2) red5
3) flash
/flex
4) silverlight
5)其他
(请指定)
我想创建这样的东西:http://wami.csail.mit.edu/examples/jsapi/calculator.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,你的问题不太好。没有“最好的技术”,只有最适合你的项目的技术,而我对此一无所知。
话虽如此,还有一个事实是,您将前端和后端技术捆绑在一起,这是行不通的。以及您需要在音频上完成什么样的“工作”。
如果是我,我会在前端使用 Flash 来录制麦克风,因为与 Silverlight 相比,它的市场渗透率最高。 JavaScript 无法录制麦克风。从那里,我可以将音频(流式传输或非流式传输)发送到服务器,在这种情况下,这实际上是悬而未决的。我可以是任何技术,除非一种语言比另一种语言有更好的音频库,否则这并不重要。如果您只想存储录音,您可以使用极其简单的东西,例如 PHP,但如果您需要更强大的东西,那么使用 Java 可能会更好。
Flash 如何将音频发送到服务器取决于您。有多种选择,但如果不需要流式传输,我会建议使用 http 上传。
Well, your question isn't exactly a good one. There is no 'best technology', only what's best for your project which I know nothing about.
With that being said, there's also the fact that you're bundling both front end and back end technologies together, which doesn't work. And what kind of 'work' do you need done on the audio.
If it was me, I'd use Flash on the front end to record the microphone since it has the most market penetration compared to say Silverlight. Javascript cannot record the microphone. From there, I can then send the audio (streamed or not) to the server, which in this case is really up in the air. I could be any technology and it wouldn't matter all that much unless one language has a better audio library than the other. If you just want to store the recording, you can use something extremely simple like PHP, but if you need something a bit more robust, you'll probably have a better time with using Java.
How Flash sends the audio to the server is up to you. There are several options but if it doesn't need to be streamed, I'd say just upload using http.
您在示例中引用的技术是开源的。它使用隐藏的 Flash 应用程序来执行从客户端到服务器的 HTTP post。通过将音频分块为多个 POST 来模拟流式传输。链接如下:
https://code.google.com/p/wami-recorder/
The technology you refer to in your example is open-source. It uses a hidden Flash app to perform an HTTP post from client to server. Streaming is simulated by chunking the audio into multiple POSTs. Here's the link:
https://code.google.com/p/wami-recorder/