# @discordjs/opus

> Opus bindings for Node

Latest version **0.10.0** (published 2025-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @discordjs/opus
pnpm add @discordjs/opus
yarn add @discordjs/opus
bun add @discordjs/opus
```

## Health

**Score 45/100 (D)** — status: stable.

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

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

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2025-01-25 |
| First published | 2020-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 2 |
| Unpacked size | 4.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 253 |
| Author | iCrawl |
| Maintainers | crawl, hydrabolt |
| Keywords | native, opus, module, c, c++, bindings, binary |

## Links

- npm: https://www.npmjs.com/package/@discordjs/opus
- Repository: https://github.com/discordjs/opus
- Homepage: https://github.com/discordjs/opus#readme
- Issues: https://github.com/discordjs/opus/issues
- npm.io page: https://npm.io/package/@discordjs/opus

## Dependencies (2)

- [node-addon-api](https://npm.io/package/node-addon-api.md) ^8.1.0
- [@discordjs/node-pre-gyp](https://npm.io/package/@discordjs/node-pre-gyp.md) ^0.4.5

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.10.0 (latest) — 2025-01-25
- 0.9.0 — 2022-10-20
- 0.8.0 — 2022-07-03
- 0.7.0 — 2021-11-12
- 0.6.0 — 2021-08-18
- 0.5.3 — 2021-06-10
- 0.5.2 — 2021-06-10
- 0.5.0 — 2021-03-19
- 0.4.0 — 2021-01-27
- 0.3.3 — 2020-10-25
- 0.3.2 — 2020-05-03
- 0.3.1 — 2020-05-02
- 0.2.1 — 2020-04-25
- 0.2.0 — 2020-04-25
- 0.1.0 — 2020-01-15

## README

# @discordjs/opus [![Build](https://github.com/discordjs/opus/workflows/Build/badge.svg)](https://github.com/discordjs/opus/actions?query=workflow%3ABuild) [![Prebuild](https://github.com/discordjs/opus/workflows/Prebuild/badge.svg)](https://github.com/discordjs/opus/actions?query=workflow%3APrebuild)

> Native bindings to libopus v1.3

## Usage

```js
const { OpusEncoder } = require('@discordjs/opus');

// Create the encoder.
// Specify 48kHz sampling rate and 2 channel size.
const encoder = new OpusEncoder(48000, 2);

// Encode and decode.
const encoded = encoder.encode(buffer);
const decoded = encoder.decode(encoded);
```

## Platform support

⚠ Node.js 12.0.0 or newer is required.

- Linux x64 & ia32
- Linux arm (RPi 1 & 2)
- Linux arm64 (RPi 3)
- macOS x64
- macOS arm64
- Windows x64

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