- 09 August 2014
- javascript
The Web Audio API provides a powerful and versatile system for controlling audio on the Web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.
Record Audio and Export to WAV files with Recorder.js
Recorder.js is a library for
recording and exporting the output of Web Audio API. It can be installed using
Bower using the package name recorderjs (not
recorder.js, it’s another library). After installation, load the
bower_components/Recorderjs/recorder.js file to your html file to use.
Note: inside the Recorderjs, there is another file named
recorderWorker.js. You will need to specify the path to that file later in
Javascript code. You should run this under an http web server, not through
file:///.
In the HTML page, I have 2 buttons for start and stop Recording
<button onclick="record()">Record</button>
<button onclick="stop()">Stop</button>Next, in the Javascript code, you need to add this to the beginning of your script file to fix the browser compatibility.
Read more