# audioform

> Extract waveform data from audio files in NodeJS

Latest version **0.3.0** (published 2022-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install audioform
pnpm add audioform
yarn add audioform
bun add audioform
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2022-04-27 |
| First published | 2022-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Hannes Diercks |
| Maintainers | xiphe |
| Keywords | node, audio, waveform, waveform-data, server, visual |

## Links

- npm: https://www.npmjs.com/package/audioform
- Repository: https://github.com/musicube-tech/audioform
- Homepage: https://github.com/musicube-tech/audioform#readme
- Issues: https://github.com/musicube-tech/audioform/issues
- npm.io page: https://npm.io/package/audioform

## Dependencies (3)

- [tempy](https://npm.io/package/tempy.md) 1.0.1
- [web-audio-api](https://npm.io/package/web-audio-api.md) 0.2.2
- [@ffmpeg-installer/ffmpeg](https://npm.io/package/@ffmpeg-installer/ffmpeg.md) 1.1.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2022-04-27
- 0.2.1 — 2022-03-14
- 0.2.0 — 2022-03-14
- 0.1.0 — 2022-03-08

## README

# audioform

Extract waveform data from audio files in NodeJS.

Implementing [CSS-Tricks: Making an Audio Waveform Visualizer with Vanilla JavaScript](https://css-tricks.com/making-an-audio-waveform-visualizer-with-vanilla-javascript/).

Using [`web-audio-api`](https://github.com/audiojs/web-audio-api).

## Install

```bash
npm install audioform
# or yarn add audioform
```

## Usage

```typescript
import { readFile } from 'fs/promises';
import audioToWaveformData, { Options } from 'audioform';

const options: Options = {
  samples: 70 // default
  channel: 0  // default
}
const buffer: Buffer = await readFile('./myAudio.mp3');
const waveformData: number[] = await audioToWaveformData(buffer, options)

console.log(waveformData)
```

## License

> The MIT License
>
> Copyright (C) 2022 Musicube GmbH
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of
> this software and associated documentation files (the "Software"), to deal in
> the Software without restriction, including without limitation the rights to
> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
> of the Software, and to permit persons to whom the Software is furnished to do
> so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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