Get a PCM stream from input AudioBuffers (Web Audio API). Can be used to implement a streaming audio recorder.
Install via npm
$ npm install audio-buffer-stream
var AudioBufferStream = require('audio-buffer-stream')
Create a transform stream that accepts AudioBuffer objects written in and outputs a raw PCM stream as buffers.
bitDepth
: specify the bit depth of the output stream (16
or32
)channels
: number of channels interleaved in the output stream (defaults2
)chunkLength
: avoid tying up the event loop by specifying a max per tick (defaults256
)opt.silenceDuration
: when specified (> 0
) will remove silences greater than specified in seconds.
MIT