#@discordjs/opus

414 messages · Page 1 of 1 (latest)

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New tag created: v0\.9\.0
vestal shaleBOT
#

Is your feature request related to a problem? Please describe.
Yes and no. The problem was that I didn't know which format is returned after calling OpusEncoder.decode(...).

Describe the ideal solution
Add to the JSDoc of the decode method that it returns PCM s16le (PCM signed 16-bit little endian)

vestal shaleBOT
vestal shaleBOT
#

Closes #136

Please describe the changes this PR makes and why it should be merged:
Adds some JSDoc to the decode method, to make it clear which format is being returned.
Semantic versioning classification:

  • [ ] This PR changes the library's interface (methods or parameters added)
    • [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • [x] This PR only includes non-code changes, like changes to documentation, README, etc.
    ...
vestal shaleBOT
#

I got this error,
PYTHON INSTALLED check
MAKE INSTALLED check
c++ isntalled check
apt package uptodate check
npm version

woute@server-wouter:~/backup/discord bots/Planet Earth$ sudo npm i
[sudo] password for woute:
npm ERR! code 1
npm ERR! path /home/woute/backup/discord bots/Planet Earth/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
npm ERR! make: Entering directory '/home/woute/backup/discord...
vestal shaleBOT
vestal shaleBOT
#

Please describe the problem you are having in as much detail as possible:

Include a reproducible code sample here, if possible:

// Place your code here

Further details:

  • @discordjs/opus version:
  • Node.js version:
  • Operating system:
  • Priority this issue should have – please be realistic and elaborate if possible:
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Unable to install @discordjs/opus, getting the error output below and unsure if the 404 error is relevant to my problem or if there is something else I am missing. Any help would be greatly appreciated

npm i @discordjs/opus

npm ERR! code 1
npm ERR! path /volume1/homes/UK/Drive/DiscordBot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh /tmp/install-96cf76db.sh
npm ERR! Failed to execute '/volume1/@appstore/Node.js_v16/usr/local/bin/node /volume1/@app...
vestal shaleBOT
#

Please describe the problem you are having in as much detail as possible:

When running the example below, the response of the opusEncode.decode results in:

dyld[53422]: missing symbol called

Include a reproducible code sample here, if possible:

    const opusEncoder = new OpusEncoder(24000, 1);

    const buffer = Buffer.from(
      '6801d5d27eca5a47fe2178960578db08005a1825a94e36157732dba57877684d3be3f200bf22a762064c83394dbec25de57a63a56617cb1733bc400...
vestal shaleBOT
#

Please describe the changes this PR makes and why it should be merged:

Semantic versioning classification:

OpusEncoder::SetBitrate is a function that sets the bitrate of the encoder to a specific value that is passed as an argument. It directly sets the bitrate to the provided value, regardless of the current bitrate of the encoder.

On the other hand, OpusEncoder::AdjustBitrate is a function that adjusts the current bitrate of the encoder by a certain value that is passed...

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm\_and\_yarn/http\-cache\-semantics\-4\.1\.1
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

here is the stacktrace:


1 warning generated.
  CC(target) Release/obj.target/libopus/deps/opus/celt/kiss_fft.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entenc.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/mathops.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/pitch.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/arm/arm_celt_map.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/arm/armcpu.o
  CC(target) Release/obj.target...
#

I think you are a developer enough to understand that not all issues can be solved by "just updating your node version", since you might have other dependencies that won't work with newer versions, also the documents says that this library works with any node version newer than 12:

<img width="462" alt="image" src="https://user-images.githubusercontent.com/39389636/218575061-86bacffd-8916-4584-9d8c-b6d4bd5c9295.png">

Also github issues exist for a a reason, Dude

vestal shaleBOT
#

Unable to install @discordjs/opus, getting the error output below.

npm ERR! code 1
npm ERR! path /Users/johnalban/Documents/codingStuff/Personal projects/Discord-bot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh /var/folders/v9/tssb2ckj5vb394w6nqj07x8h0000gn/T/install-db9dedbe.sh
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
npm ERR!   CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_encoder.o
npm E...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Is your feature request related to a problem? Please describe.
I experience problems when i try to install this library on Ubuntu 22.10 because it needs to be compiled for glibc 2.36. The install process try to compile it on my computer but the compilation fail every time

Describe the ideal solution
I though on adding a precompiled binary for glibc 2.36 so it simplifies the process of installing this lib on newer Ubuntu versions

Describe alternatives you've considered
To ...

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\Users\serha\node_modules\@discordjs',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\serha\node_modules@discordjs\opus\deps\opus\celt'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\serha\node_modules\@discordjs\opus\deps\opus\celt'
npm...

vestal shaleBOT
vestal shaleBOT
#

Hello!
I'm getting an error when installing the module.
I have already tried everything and nothing works.
node.js -v 18.16.1

❯ npm i discordjs/opus
npm ERR! code 1
npm ERR! path /home/aernjdz/ua-bot/ukrainian bot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! make: входимо до каталогу «/home/aernjdz/ua-bot/ukrainian bot/node_modules/@discordjs/opus/build»
npm ERR! CC(target) Release/obj.target/libo...

vestal shaleBOT
#

The implementation of OpusEncoder::AdjustBitrate() looks the same as the existing OpusEncoder::SetBitrate()

it is not because setBitrate is setting the bitrate before the application or processing start but the adjustBitrate is can change the bitrate during the app running or process running

both seem to use opus_encoder_ctl(this->encoder, OPUS_SET_BITRATE(value)), what's the difference? Plus you are not checking if encoder exists in first place (encoder is lazy loaded so ...

vestal shaleBOT
vestal shaleBOT
#

I tried to install @discordjs/opus using nodejs versions above v18.18.2 but the same error keeps coming back.
I have observed several identical cases using nodejs v20 and encountering this error. I have deduced that the package does not support versions higher than nodejs v18.18.2.

Erreur :

C:\Users\mathi\Desktop\Spectra\botmusic> npm install @discordjs/opus@0.9.0
npm ERR! code 1
npm ERR! path C:\Users\mathi\Desktop\Spectra\botmusic\node_modules\@discordjs\opus
npm ERR! comman...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Please describe the problem you are having in as much detail as possible:

Trying to decode opus data that come from open-ai tts

Include a reproducible code sample here, if possible:

import fs from "fs";
import path from "path";
import "openai/shims/node";
import OpenAI from "openai";
import { OpusEncoder } from "@discordjs/opus";

const openai = new OpenAI({
  apiKey: "***" // replace this with open-ai key,
});

const speechFile = path.resolve("./spee...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

There is indeed an issue with Python 3.12.

Python 3.12 removes "distutils" which breaks node-gyp before v10. node-gyp is located in npm's node_modules and you can't upgrade it without upgrading the whole npm.

Fortunately, node-gyp is updated on latest release of npm, which also preinstalled on Node.js v20.10.0. So to fix problems related to "distutils" and Python 3.12, you'll only need to upgrade your Node.js version. But, if you're using other package manager like pnpm, you'll need to...

vestal shaleBOT
vestal shaleBOT
#

Please describe the changes this PR makes and why it should be merged:

This PR addresses the dyld: missing symbol called fatal error on Apple Silicon by adding the required file for NEON compilation.

The related issue, reported in #142, previously necessitated a workaround involving the use of x64 Node.js with Rosetta, resulting in degraded performance. This PR enables native support for the arm64 architecture in this library.

Additionally, I have added a test in `tests/test.js...

vestal shaleBOT
#

The module is throwing a 404 error because the files associated with Node.js v20 (node-v115) have not yet been deployed.

https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-linux-x64-glibc-2.31.tar.gz

https://github.com/discordjs/opus/releases/tag/v0.9.0

npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/discord/node_modules/...
vestal shaleBOT
#
[discordjs/opus] New branch created: feat/node-20-and-21
#

Please describe the changes this PR makes and why it should be merged:

Because prebuilds are awesome
Also adds in the macos-13 target (should we also add macos-14 (which is M1)?)

Semantic versioning classification:

  • [ ] This PR changes the library's interface (methods or parameters added)
    • [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • [ ] This PR only includes non-code changes, like changes to documentation, READM...
vestal shaleBOT
#

I get the message "xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates" and when I go to software update it says my Mac is up to date.
cc @PAdventures & @JoeKyx

Are you still running into this issue? I know we are like a year detached from this now but I was just running into this on my own project and it seems like a space in your working dir will cause the build to fail. After I removed the space from the fold...

vestal shaleBOT
#

I get the message "xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates" and when I go to software update it says my Mac is up to date.

cc @PAdventures & @JoeKyx

Are you still running into this issue? I know we are like a year detached from this now but I was just running into this on my own project and it seems like a space in your working dir will cause the build to fail. After I removed the space fr...

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

I really hope you‘re not having the same issue. Because theirs is 3 years old, using very outdated versions of nodeJS, outdated version of @discordjs/opus, outdated version of discord.js and /voice, etc.
So if you have an issue with the current version of /opus look at current issues. But probably your issue isn’t even with /opus but discord.js and/or /voice, so join the support discord for discord.js and ask for help there instead.

vestal shaleBOT
#

Issue description

Getting the following error when trying to NPM install

Code sample

0.826 npm WARN EBADENGINE Unsupported engine {
0.826 npm WARN EBADENGINE   package: '[email protected]',
0.827 npm WARN EBADENGINE   required: { node: '~0.6.6' },
0.827 npm WARN EBADENGINE   current: { node: 'v22.0.0', npm: '10.5.1' }
0.827 npm WARN EBADENGINE }
9.211 npm notice
9.211 npm notice New minor version of npm available! 10.5.1 -> 10.6.0
9.211 npm notice Changelog: 
9.211 n...
vestal shaleBOT
vestal shaleBOT
#

Issue description

I can't use the package while using "Bun", which said to compatibility with Node.js v20.

I think Bun alway using node-v115-napi-v3-${OS}-glibc-2.29 as it primary. If this is the case, can we support this into the package?

Step to reproduce:

  1. Install @discordjs/opus:0.9.0 by command bun add @discordjs/opus
  2. Execute the function that using the @discordjs/opus
  3. Error pop-up:
See: https://distube.js.org/classes/DisTube.html#error and http...
vestal shaleBOT
#

## Description

This PR addresses a node-gyp build error when using GCC 14 by adding a cflag to ignore that error type.

This error only occurs when there is no prebuilt for the node release that the user has installed.

GCC 14 changed incompatible-pointer-types to be an error instead of a warning https://gcc.gnu.org/gcc-14/porting_to.html.This causes the node-gyp build to fail on newer linux distros.

  • [x] Code changes have been tested, or there are no code changes
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New branch created: feat/node-22-prebuilds-and-fix-cve
vestal shaleBOT
#

Issue description

Due to the recent major security vulnerability reported with all versions of @discordjs/opus, are there any plans to release a fix for this? With the project not having been updated in almost two years, I was hoping to get clarification on this, and make sure it's not just abandoned by the developers.

If this has already been discussed or is planned, my apologies. I couldn't find anything recent from this project about it. (The issue is also fairly new, so I understa...

vestal shaleBOT
vestal shaleBOT
#

Just came here to +1 bump this

➤ YN0000: │ @discordjs/opus@npm:0.9.0 STDERR node-pre-gyp info check checked for "/app/node_modules/@discordjs/opus/prebuild/node-v120-napi-v3-linux-x64-glibc-2.36/opus.node" (not found)
➤ YN0000: │ @discordjs/opus@npm:0.9.0 STDERR node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v120-napi-v3-linux-x64-glibc-2.36.tar.gz
➤ YN0000: │ @discordjs/opus@npm:0.9.0 STDERR node-pre-gyp ERR! install response sta...
vestal shaleBOT
#

Issue description

I can't install @discordjs/opus when running npm i @discordjs/opus.

Error i got from console

message.txt

More details:

  • Node.js version: 6, 8, 12, 16, 18 (i tried with that versions)
  • NPM version: 10.7.0
  • NVM version: 8.17.0
  • Operating system: Rocky Linux 9.4 aarch64 (arm)

Code sample

No response

Versions

  • Node.js version: 6, 8, 12, 16, 18 (i tried with that versions)
  • NP...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Can you get us a minimum repro sample with bun? Also, make sure @discordjs/opus is trusted in bun (so postinstall scripts run and actually load the appropriate binary files)

☝️

as @vladfrangu mentioned, make sure you add @discordjs/opus to your trustedDependencies in package.json.

Also make sure you have these dependencies in your system

build-essential     libtool     automake     python3  ffmpeg

I was facing the same issue with bun.

vestal shaleBOT
#
[discordjs/opus] New branch created: feat/arm-prebuilts
vestal shaleBOT
vestal shaleBOT
#

Issue description

Hi. Recently, I have been unable to install @discordjs/opus on my computer and server, both running Arch Linux.

Steps to reproduce:

  1. npm init
  2. npm install @discordjs/opus

npm output:

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated ...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Issue description

try to test decode opus file, code like this:
`const fs = require('fs');
const { OpusEncoder } = require('@discordjs/opus');

const inputOpusFile = 'input.ogg'//'output.ogg'//'input.opus';
const outputPcmFile = 'output.pcm';

const decoder = new OpusEncoder(48000, 1);

const opusData = fs.readFileSync(inputOpusFile);

const pcmData = decoder.decode(opusData);

fs.writeFileSync(outputPcmFile, pcmData);
`

and the input.ogg file stream info (from ffprobe):...

vestal shaleBOT
#

Issue description

I don't know.

Code sample

~/Music-bot $ npm i @discordjs/opus

> @discordjs/opus@0.9.0 install
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.4.5
node-pre-gyp info using node@22.8.0 | android | arm
(node:9391) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to sho...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

I met a similar issue and I found a solution. I am not sure it is a general solution for every one but here I just share it:

If encoder.encode(buffer) throws error: "Error: Cannot create a Buffer larger than 0x100000000 bytes"

Split the buffer into 3840-length smaller buffers, encode then and concat the result.

Sample code:

let result = Buffer.alloc(0)
for(let i = 3840; i <= buffer.length; i +=3840) {
    result = Buffer.concat([result, encoder.encode(buffer.subarray(i ...
vestal shaleBOT
#

Issue description

  1. Prepare some PCM data. In my case it's 16kHz mono, 16bits.
  2. Encode it with 960 bytes per frame.
  3. Watch the crash

After digging into the missing symbols, I managed to fix that by adding "opus/silk/arm/NSQ_neon.c" to the "target_arch==\"arm64\"" condition in @discordjs/opus/deps/binding.gyp .

Code sample

import { OpusEncoder } from '@discordjs/opus';

const buffer = ...;
const bytesPerFrame = 960;
const frame = buffer.subarray...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

i also need help with it i ran pnpm install but i have a problem in discord opus and voice , i get error code 7 and 1 , ihave node js version 23
heres the output
`pnpm install
 WARN  19 deprecated subdependencies found: @cliqz/[email protected], @cliqz/[email protected], @cliqz/[email protected], @cliqz/[email protected], @discordjs/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected],...

vestal shaleBOT
#

i also need help with it i ran pnpm install but i have a problem in discord opus and voice , i get error code 7 and 1 , ihave node js version 23 heres the output `pnpm install  WARN  19 deprecated subdependencies found: @cliqz/[email protected], @cliqz/[email protected], @cliqz/[email protected], @cliqz/[email protected], @discordjs/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], h...

vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New branch created: amish/v0.10.0
#
[discordjs/opus] New tag created: v0.10.0
#
[discordjs/opus] New branch created: chore/cleanup-for-matrices
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

If anyone has the same Problem and came across this, here is the command that will install all necessary packages via apt on ubuntu to fix this. I don't know if you really need all packages in the command, but this has fixed it for me:

apt update && apt install -y build-essential python3 make g++
My first guess is, that you probably only need the build-essentials and g++ for it to work, since you need to compile opus voice in order to install it. Works on dedicated and vserver. TESTED

vestal shaleBOT
vestal shaleBOT
#

Feature

Some workloads such as machine learning often require floating-point representations of audio waveforms. While it's technically possible to decode Opus packets to 16-bit PCM and then convert to float32, doing this conversion in JavaScript adds unnecessary overhead that slows down programs. libopus natively supports decoding to float32 through the opus_decode_float function, but this is not yet implemented in the current version. I believe adding this feature would be highly benef...

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New branch created: chore/remove-old-ubuntu
vestal shaleBOT
#

Issue description

No matter what I do, OPUS fails to install and throws errors for NPM. Tried different base OS, tried different node versions, npm versions. No matter what it always fails.

npm error command sh -c node-pre-gyp install --fallback-to-build

Code sample

FROM ubuntu

#Bot Token and MongoDB Connection String
ENV TOKEN= \
    MONGODB= \
    CLIENTID=


# Install python/pip
#RUN apk add --update alpine-sdk
#RUN apk add --no-cache python3 py3-pip
RUN apt-ge...
vestal shaleBOT
vestal shaleBOT
#

Issue description

  1. npm i @discordjs/opus
    I received the warning above. Is it safe to ignore it?

Code sample

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated npmlog@5.0.1: Thi...
vestal shaleBOT
#

Issue description

......
rror ../deps/opus/silk/fixed/encode_frame_FIX.c:206:21: note: in expansion of macro ‘silk_NSQ’
npm error   206 |                     silk_NSQ( &psEnc->sCmn, &psEnc->sCmn.sNSQ, &psEnc->sCmn.indices, x_frame, psEnc->sCmn.pulses,
npm error       |                     ^~~~~~~~
npm error ../deps/opus/silk/main.h:270:18: note: referencing argument 13 of type ‘const int[4]’
npm error   270 |     ((void)(arch),silk_NSQ_c(psEncC, NSQ, psIndices, x16, pulses, PredCoef_...
vestal shaleBOT
old tiger
#

@discordjs/opus

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Issue description

When I install npm install @discordjs/opus then opus.node appears in "node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-darwin-arm64-unknown-unknown/" and electron is looking for it in "node_modules/@discordjs/opus/prebuild/electron-v24.8-napi-v3-darwin-arm64-unknown-unknown/" Help appreciated!

Code sample


Versions

Node version 18.15.0

Issue priority

High (immediate attention needed)

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/js-yaml-4.1.1
#

Bumps js-yaml from 4.1.0 to 4.1.1.

Changelog
Sourced from js-yaml's changelog.

[4.1.1] - 2025-11-12
Security

Fix prototype pollution issue in yaml merge (<<) operator.

Commits

cc482e7 4.1.1 released
50968b8 dist rebuild
d092d86 lint fix
383665f fix prototype pollution in merge (<<)
0d3ca7a README.md: HTTP => HTTPS (#678)
49baadd doc: 'empty' style option for !!null
ba3460e Fix demo link (#618)
See full diff in compare view

[![De...

vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/glob-10.5.0
vestal shaleBOT
#
[discordjs/opus] New branch created: feat/optional-channels-and-rate
#
[discordjs/opus] New branch created: chore/workflow-updates
#
[discordjs/opus] New branch created: chore/bump-deps
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#
[discordjs/opus] New branch created: chore/readme-updates
#
[discordjs/opus] New branch created: refactor/bump-node
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Regarding the remaining points raised by copilot:

  • delete vs delete[]: Yes, arrays must be freed with delete[]. However, I realized I simply mirrored the existing logic for outPcm which implies the original code also has this bug as well.
  • Error Handling: This also seems correct. I'll add the proper check for them.

I'm ready to push fixes for them. Before I begin, I have some questions; For the two points mentioned above, should I fix the existing bug in this PR while I'm at it? ...

vestal shaleBOT
vestal shaleBOT
#

Description

This code exposes Opus's FEC and PLC support in discord/opus.

If the Opus data being decoded passed over an unreliable channel (e.g. WebRTC) at some point, packets may be missing. FEC and PLC allow missing audio to be interpolated.

This code has been written to be backward-compatible, so existing usages won't need to change.

  • [x] Code changes have been tested, or there are no code changes
#

Feature

The Opus library supports forward-error correction (FEC) and packet loss concealment (PLC).

This is useful if the audio being decoded was sent at some point over an unreliable channel, e.g. WebRTC. These functions allow the missing audio to be interpolated, creating a better experience for the listener.

I have written a PR to add these functions (https://github.com/discordjs/opus/pull/195) but I saw that issues are usually wanted before PRs, so I filed this as well -- sorry fo...

vestal shaleBOT
#

Description

This code exposes Opus's FEC and PLC support in discord/opus.

If the Opus data being decoded passed over an unreliable channel (e.g. WebRTC) at some point, packets may be missing. FEC and PLC allow missing audio to be interpolated.

This code has been written to be backward-compatible, so existing usages won't need to change.

This is a different API approach than https://github.com/discordjs/opus/pull/195 to implement the feature request in https://github.com/discord...

vestal shaleBOT
#

Issue description

Hi,

We are a research team investigating plausible but incomplete security patches. We have identified a potential issue with the DoS fix for CVE-2024-21521 and have manually confirmed the pattern only through our analysis. Would you kindly help confirm the issue?

Summary

The DoS fix for CVE-2024-21521 adds argument count and type checks at entry points, but internal functions might still call toString() on user input without validation. This could allow DoS at...

vestal shaleBOT
#
xuy

Summary

Adds CI jobs to build prebuilt binaries for glibc 2.41 (Debian Trixie) systems.

Problem

Currently, @discordjs/opus prebuilt binaries are only available for:

  • glibc 2.31 (Ubuntu 20.04)
  • glibc 2.35 (Ubuntu 22.04)
  • glibc 2.39 (Ubuntu 24.04)

Users on Debian 13 (Trixie) and Raspberry Pi OS Trixie get glibc 2.41, which has no prebuilt binary. This causes npm install to:

  1. Try to download the missing glibc-2.41 prebuilt
  2. Fall back to compiling from source
  3. The compilati...
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Question

The CI workflow (.github/workflows/release.yml) already includes Node 24 in the build matrix:

However, when installing @discordjs/[email protected] on Node v24.11.1 (macOS arm64), the prebuilt binary returns 404:

Is there a timeline for when the Node 24 prebuilt binaries will be available? Or is there a way to trigger a new release that includes Node 24 builds?

Context

This issue is blocking OpenClaw upgrades on Node 24 environments:

vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/multi-e24801ecd2
#

Bumps and minimatch. These dependencies needed to be updated together.
Updates minimatch from 3.1.2 to 3.1.4

Commits

1a2e084 3.1.4
ae24656 update lockfile
b100374 limit recursion for **, improve perf considerably
26ffeaa lockfile update
9eca892 lock node version to 14
00c323b 3.1.3
30486b2 update CI matrix and actions
9c31b2d update test expectations for coalesced consecutive stars
46fe687 coalesce consecutive non-globstar * characters
5a9ccbd [meta...

vestal shaleBOT
vestal shaleBOT
#

Bumps and minimatch. These dependencies needed to be updated together.
Updates minimatch from 3.1.2 to 3.1.5

Commits

7bba978 3.1.5
bd25942 docs: add warning about ReDoS
1a9c27c fix partial matching of globstar patterns
1a2e084 3.1.4
ae24656 update lockfile
b100374 limit recursion for **, improve perf considerably
26ffeaa lockfile update
9eca892 lock node version to 14
00c323b 3.1.3
30486b2 update CI matrix and actions
Additional commits viewable in ...

vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/multi-f5f34deeac
vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/flatted-3.4.2
#

Bumps flatted from 3.3.3 to 3.4.2.

Commits

3bf0909 3.4.2
885ddcc fix CWE-1321
0bdba70 added flatted-view to the benchmark
2a02dce 3.4.1
fba4e8f Merge pull request #89 from WebReflection/python-fix
5fe8648 added "when in Rome" also a test for PHP
53517ad some minor improvement
b3e2a0c Fixing recursion issue in Python too
c4b46db Add SECURITY.md for security policy and reporting
f86d071 Create dependabot.yml for version updates
Additional ...

vestal shaleBOT
#

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt


This section details on the original issue you should resolve

[Question] Node 24 (v137) prebuilt binary availability

Question

The CI workflow already includes Node 24 in the build matrix, but the latest release v0.10.0 does not include Node 24 prebuilt binaries.

Is there a timeline for ...

vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/multi-bf05dc1ecf
#

Bumps and picomatch. These dependencies needed to be updated together.
Updates picomatch from 4.0.3 to 4.0.4

Release notes
Sourced from picomatch's releases.

4.0.4
This is a security release fixing several security relevant issues.
What's Changed

Fix for CVE-2026-33671
Fix for CVE-2026-33672

Full Changelog: https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4

Commits

e5474fc Publish 4.0.4
4516eb5 Merge commit from fork
5eceecd Mer...

vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
vestal shaleBOT
#

Description

Testing this node add-on in node 24 Debian bookworm.
This node-addon is causing a SIGSEGV

Steps:
Create multiple (~10-15) OpusEncoders.
Call .decode on them
Release the encoders so that they are deleted.

The next OpusEncoder.decode causes a SIGSEGV.

Fix:
this->outPcm is allocated as an array, but delete was called without the array operator. Adding the array operator fixed the crash.

vestal shaleBOT
#
[discordjs/opus] New branch created: dependabot/npm_and_yarn/ip-address-10.2.0