# audio-buffer-stream

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

Latest version **1.1.0** (published 2015-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install audio-buffer-stream
pnpm add audio-buffer-stream
yarn add audio-buffer-stream
bun add audio-buffer-stream
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-10-08 |
| First published | 2015-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Matt McKegg |
| Maintainers | mmckegg |
| Keywords | AudioBuffer, stream |

## Links

- npm: https://www.npmjs.com/package/audio-buffer-stream
- Repository: https://github.com/mmckegg/audio-buffer-stream
- Homepage: https://github.com/mmckegg/audio-buffer-stream#readme
- Issues: https://github.com/mmckegg/audio-buffer-stream/issues
- npm.io page: https://npm.io/package/audio-buffer-stream

## Dependencies (1)

- [xtend](https://npm.io/package/xtend.md) ^4.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-10-08
- 1.0.0 — 2015-10-07

## 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](https://www.npmjs.com/package/audio-buffer-stream)

```bash
$ npm install audio-buffer-stream
```

## API

```js
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

---
_Source: https://npm.io/package/audio-buffer-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
