abs
audio-buffer-stream
npm i audio-buffer-stream
abs

audio-buffer-stream

Get a PCM stream from input AudioBuffers (Web Audio API). Can be used to implement a streaming audio recorder.

by Matt McKegg

1.1.0 (see all)License:MITTypeScript:Not Found
npm i audio-buffer-stream
Readme

audio-buffer-stream

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

API

var AudioBufferStream = require('audio-buffer-stream')

var stream = AudioBufferStream(opts)

Create a transform stream that accepts AudioBuffer objects written in and outputs a raw PCM stream as buffers.

opts

  • bitDepth: specify the bit depth of the output stream (16 or 32)
  • channels: number of channels interleaved in the output stream (defaults 2)
  • chunkLength: avoid tying up the event loop by specifying a max per tick (defaults 256)
  • opt.silenceDuration: when specified (> 0) will remove silences greater than specified in seconds.

stream.write(audioBuffer)

stream.pipe(destination, opts)

stream.setSilenceDuration(seconds)

stream.end()

License

MIT

Downloads/wk

15

GitHub Stars

21

LAST COMMIT

7yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
1.1.0
latest
7yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate