简体   繁体   中英

Can anyone suggest how to record audio from microphone on a website using html5 and javascript

I want to record audio using javascript and html5, there is device element in html5 but i dont know to use it. Found no examples for the same.

No current stable browser supports the Stream API (formally known as <device> ), so in practical terms — you can't. The lack of examples using it is a consequence of this.

If you want to play with it, you have to use development branches of Chrome. There is a demo of voice input here .

currently, there are three ways to do it

  1. as wav
    all code client-side, uncompressed recording], you can check out --> http://github.com/mattdiamond/Recorderjs
  2. as mp3 [ all code client-side, compressed recording], you can check out --> http://github.com/Mido22/mp3Recorder
  3. as opus packets [ client+ server( node.js ) code, compressed recording], you can check out --> http://github.com/Mido22/recordOpus

快速搜索返回https://labs.ericsson.com/developer-community/blog/beyond-html5-audio-capture-web-browsers ,其中包含您提到的device元素。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM