Record Sounds from AudioContext (Web Audio API)

kennysong picture kennysong · Jan 19, 2013 · Viewed 10.9k times · Source

Is there a way to record the audio data that's being sent to webkitAudioContext.destination?

The data that the nodes are sending there is being played by the browser, so there should be some way to store that data into a (.wav) file.

Answer

cwilso picture cwilso · Jan 20, 2013

Currently, there's not a native way to do that, but as Max said in the comment above, Recorderjs does essentially this (it doesn't chain onto the destination, but is a ScriptProcessorNode you can connect other nodes to, and have its input recorded. I built on Recorderjs to do a simple audio file recorder - https://github.com/cwilso/AudioRecorder.