# @audio/decode-mp3

> Decode MP3 audio with mpg123 WASM

Latest version **1.3.1** (published 2026-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @audio/decode-mp3
pnpm add @audio/decode-mp3
yarn add @audio/decode-mp3
bun add @audio/decode-mp3
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2026-08-12 |
| First published | 2026-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 1 |
| Unpacked size | 99.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 208 |
| Author | audiojs |
| Maintainers | jamen, dfcreative, dy |
| Keywords | mp3, mpeg, audio, decode, decoder, wasm, mpg123 |

## Links

- npm: https://www.npmjs.com/package/@audio/decode-mp3
- Repository: https://github.com/audiojs/decode
- Homepage: https://github.com/audiojs/decode/tree/master/packages/decode-mp3#readme
- Issues: https://github.com/audiojs/decode/issues
- Funding: https://github.com/sponsors/audiojs
- npm.io page: https://npm.io/package/@audio/decode-mp3

## Dependencies (1)

- [mpg123-decoder](https://npm.io/package/mpg123-decoder.md) ^1.0.3

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K 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

## Recent versions

- 1.3.1 (latest) — 2026-08-12
- 1.3.0 — 2026-08-11
- 1.2.3 — 2026-07-14
- 1.2.2 — 2026-07-11
- 1.2.1 — 2026-07-10
- 1.2.0 — 2026-07-10
- 1.1.0 — 2026-04-20
- 1.0.0 — 2026-04-10

## README

# @audio/decode-mp3

Decode MP3 audio with [mpg123-decoder](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/mpg123-decoder).

```js
import decode, { decoder } from '@audio/decode-mp3'

let { channelData, sampleRate } = await decode(mp3Bytes)

let dec = await decoder() // initialize WASM
let a = dec.decode(chunk1)
let b = dec.decode(chunk2)
dec.free()
```

`decoder()` is asynchronous. Its `decode()` method is synchronous.

## License

[ॐ](https://github.com/krishnized/license/) · [MIT](./LICENSE)

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