#@discordjs/opus
414 messages · Page 1 of 1 (latest)

If i trying update discord-opus to 0.8.0 i getting this
-----> Installing dependencies
Installing node modules (package.json)
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /app/tmp/preinstall-.sh
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/app/tmp/preinstall-.sh'
npm ERR! enoent Th...
It does exist, it's just deprecated.
The error you're having is a build one, please update to 0.8.0 to get the latest prebuilds and fixes.
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)
Can you open a PR doing the mentioned changes? Or do you prefer somebody else to do this instead?
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.
...
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...
something maybe with node version, cause i got some kind of error when tried to use latest lts node, but when i used 14.21.1 things are getting more stable, but still can't launch karma too
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:
It keeps returning that the phone number is invalid
This is neither a JSON decoder error nor a library that can return such error. Please inspect your code more closely before opening an issue.
Furthermore, please do not ignore the template when making issues.
While downloading discordjs/opus i got a long error some people told me to download vs 2022 with c++ and python3 but I still got an error
Error link
https://sourceb.in/qi7wYHVPUq
Further details:
- @discordjs/opus version:
- Node.js version: 19
- Operating system: v19.3.0
- Priority this issue should have – please be realistic and elaborate if possible:
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...
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...
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...
The implementation of OpusEncoder::AdjustBitrate() looks the same as the existing OpusEncoder::SetBitrate()
The implementation of
OpusEncoder::AdjustBitrate()looks the same as the existingOpusEncoder::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
@maxckelly I haven't found a solution to this yet.
For the part of my project where I do need this package I spin up and old linux laptop with an x64 architecture.
For anyone experiencing this I followed this steps and it now works. https://gist.github.com/adrienjoly/e29a6e73fb7e701eefd80ff9bde9abeb
You still stuck at this? It seems like you have not installed the package build-essential, just install it with your package manager, e.g. sudo apt install build-essential
0f13e33 chore(deps): bump http-cache-semantics from 4.1... - dependabot[bot]
Bumps http-cache-semantics from 4.1.0 to 4.1.1.
Commits
2449650 Update mocha
560b2d8 Don't use regex to trim whitespace
b1bdb92 Remove linting package zoo
c20dc7e Cache 308
See full diff in compare view
[](https://docs.github.com...
Hello, I am also having this issue and mine says x64
Install @discordjs/opus at the latest version 0.9.0
npm uninstall @discordjs/opus
npm install @discordjs/[email protected]
Node 19 support came out in 0.9.0 and you are using @discordjs/opus version 0.8.0.
hello i still have this issue?
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...
Most likely your Node.js version is too outdated. Install NVM and install the latest LTS version and try again. If the problem persists, send the new stacktrace.
Also, the issue is closed due to this being fixed already. Learn Google, dude.
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
and the "closed" tag exists for a reason lmao
Glad you took part in this issue, by proving....nothing, here is your achivement
<img width="604" alt="image" src="https://user-images.githubusercontent.com/39389636/218576559-26a744ed-62c6-4b08-af49-342a93bd1c42.png">
and you still haven't updated node, +1
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...
Do you not have build tools?
Do you not have build tools?
I'm sorry but could you elaborate further? I'm in the learning stage for all of this so I'm not fully sure what you're asking me. As far I know I needed a recent version of Python, what else am I missing?
On macOS, I believe you should open a terminal and run xcode-select --install and try again.
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.
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 ...
I'm not sure how this is invalid, the readme says that it support the arm version of macos. The given workaround from @maxckelly running in a emulation x86 layer (rosetta).
Up, thanks for your answer, but can you provide a code example to solve the problem ?
Hey, exactly the same for me. xcode-select --install also returns "xcode-select: error: command line tools are already installed, use "Software Update" to install updates"
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...
It couldn’t find VisualStudios C++ dev pack. Go to the link mentioned in that error, it tells you everything you need
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...
The implementation of
OpusEncoder::AdjustBitrate()looks the same as the existingOpusEncoder::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 ...
I'm suffering here too
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...
This package definitely does support that version and has for a long time now. I installed it successfully on Node.js 18.17.1 right now, just to be sure.
I'm not sure why this is failing for you though. Maybe look at where it says this:
could not find a version of Visual Studio 2017 or newer to use
Also, do you have build tools installed?
I tried to install @discordjs/opus using nodejs versions above v18.18.2
Wait, is the title of your issue wrong?
Yes I have python 3.12 installed and visual studio installed as indicated in the error.
I've seen around me that several people had the same problem with a nodejs version higher than v18.
Hmm, I managed a successful install on 20.9.0. Maybe this is a Windows issue, as I'm reproducing this on Mac...
Do we have any idea on when this can be fixed? I am having issues installing this on my Ubuntu 22.04 LTS? any help would be fab?
Same problem on arch and windows.
Please describe the changes this PR makes and why it should be merged:
This PR includes following changes:
- Fix python version to 3.8 in node 17 and below (nodejs/node-gyp#2219)
- Install setuptools in node 18 and above (nodejs/node-gyp#2869)
- Remove macos-10.15 and ubuntu-18.04 runner (They are no longer supported)
- A...
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...
Are you sure the opus from OpenAI is encoded as 24000 bitrate?
Same issue. It won't install on Node v20.9.0 - Python 3.12.0 - windows-build-tools 5.2.2
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...
Same issue. It won't install on Node v20.9.0 - Python 3.12.0 - windows-build-tools 5.2.2
I solved this just by switching to the latest v19 of Nodejs using nvm windows. Fortunately I did not have any v20 specific npm packages so it didn't break anything :)
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...
Hi @kevinvdburgt, this PR (#150) should fix the problem on ARM macOS without x86 emulation.
The module is throwing a 404 error because the files associated with Node.js v20 (node-v115) have not yet been deployed.
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/...
88ea42d feat: prebuilds for node 20 and 21 - vladfrangu
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...
Closing because I totally didn't miss #147
a84da82 fix: dyld missing symbol called on arm arch (#150) - JacobLinCool
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...
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...
any one got the solution?
Until this is fixed, you can use the opusscript module instead.
I'm having the same problem, were you able to solve it?
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.
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...
You are missing build_essentials, explicitly make in this case. Make sure you got everything needed installed to compile opus on your host.
Sweet that was it. Thank you. Guess I shoulda caught that in the errors.
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:
- Install
@discordjs/opus:0.9.0by commandbun add @discordjs/opus - Execute the function that using the
@discordjs/opus - Error pop-up:
See: https://distube.js.org/classes/DisTube.html#error and http...
## 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
Feature
Make this package support node 20
Ideal solution or implementation
Add binaries for node 20
Alternative solutions or implementations
No response
Other context
No response
are you saying that @discordjs/opus is not supported for node 20?
then if I switch to node 18 and install it then it should work right?
This issue is happening to me after I upgraded my Fedora wsl from 38 to 40, before it was working well. And the error appears no matter if I'm using node 20.13.1 or 19.9.0
With opusscript it's working without issue
In theory I should have looked at the issues on this repo before going down the rabbit hole, but the fact that there is also a maximum Node requirement should be mentioned in the README if possible. It would save quite a bit of time. Thanks!!
Having this same issue. Would love if it could be fixed!
## Description
-
node 22 prebuilts
-
[x] Code changes have been tested, or there are no code changes
The project is always buildable locally, even if we don't provide prebuilds. You just need to have build tools installed on your side. If you still cannot build the project even after that, follow up here
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)
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...
My apologies. I just saw the pull request that was pulled under a different title. I'll be closing this.
Keep in mind that the CVE is in no way a "major vulnerability". Its the second time we get a CVE, that, imo, is ranked very inaccurately, and I've opened a PR for that on their side. The "vulnerability" is you, the developer, passing in wrong data when constructing the encoder, causing a crash - something that you'd spot and fix in 5 minutes tops.
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...
Issue description
I can't install @discordjs/opus when running npm i @discordjs/opus.
Error i got from console
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...
Had the same problem. Installing discordjs/opus directly from GitHub fixed the issue for me: npm install github:discordjs/opus
if u have python >= 3.12 installed via brew, you can try to install python-setuptools
that worked for me
Can you get us a minimum repro sample with bun? Also, make sure
@discordjs/opusis 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.
## Description
- removes macos 11 as its been deprecated
- prebuilds for x86_64 macos 14, as well as arm macs
Issue description
Hi. Recently, I have been unable to install @discordjs/opus on my computer and server, both running Arch Linux.
Steps to reproduce:
npm initnpm 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 ...
This was fixed in #155, however the npm package is outdated, until a new version is published here is a current fix:
- install
gcc13with pacman - run
export CC=gcc-13andexport CXX=g++-13 - then install package normally
- don't forget to use
unsetto clearCCandCXXif you prefer using the latest gcc toolchain
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):...
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...
PS- I had all the packages required for the installed. Tweaked some things for termux and waited and it installed itself.
This should be fixed by #157, it should work after next release.
Can you please create a new release, for supporting recent node versions?
## Description
Easier to track which version is used, and to perform upgrades.
- [X] Code changes have been tested, or there are no code changes
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 ...
Issue description
- Prepare some PCM data. In my case it's 16kHz mono, 16bits.
- Encode it with 960 bytes per frame.
- 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...
getting same error on macos
encoding pcm16, 24kHz mono
## Description
Fixes dyld: missing symbol called on macOS and apple silicon
as reported in #165
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],...
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...
Since this is yet to be reviewed, I have prepared a list of alternative opus libs for node which could work for the people having issues:
1. mediaplex
mediaplex has opus api which is exactly the same as @discordjs/opus but is written in rust instead of c++ which makes the installation easier.
2. @evan/opus
@evan/opus has different api but gets the job done and author...
## Description
Bump v0.10.0
- [ ] Code changes have been tested, or there are no code changes
695cb3d chore: cleanup matrices - vladfrangu
## Description
-
Removes macos-12 (deprecated) and windows-2019 for newer node versions (double windows versions don't work)
-
[ ] Code changes have been tested, or there are no code changes
Hey, can you confirm this is no longer an issue with 0.10.0?
Try again with 0.10.0.
## Description
Makes the markdown work!
- [x] Code changes have been tested, or there are no code changes
Description
This adds builds and releases using the ubuntu-24.04 runners as well as the other existing ones.
- [x] Code changes have been tested, or there are no code changes
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
Can confirm adding it as a trusted dependecy works
bun add @discordjs/opus --trust
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...
@vladfrangu Can this get reviewed and merged?
Is this needed? I've been able to use it on macos M1 without this 👀
Is this needed? I've been able to use it on macos M1 without this 👀
Interesting, I'm targeting linux/arm64/v8 container platform in my GitHub build and it's failing to compile opus inside it for I believe the error this PR fixes. I'll have to try and isolate it further to reproduce.
If you can get us a repro dockerfile or such that'd be lovely too! Including the JS code to test locally 🙏
Can confirm adding it as a trusted dependecy works
bun add @discordjs/opus --trust
This actually worked, thanks guys !
I'm having this exact issue but with pnpm
Can you open a new issue for it and with a reproduction repo? 🙏
55d39a4 chore: remove ubuntu-20.04 - vladfrangu
Description
- [x] Code changes have been tested, or there are no code changes
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...
You'll need to install build-essential and python3 first: sudo apt-get install build-essential python3. The opus bindings need a C++ compiler to build the native modules. Let me know if you hit any other snags!
Alpine 18 and alpine 20 didn’t work, but Alpine 19 worked with no issues. So I think I’m good for now.
Issue description
- 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...
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_...
Howdy everybody. I was about to make a pull request of my own to get this issue fixed. I'm using an M4 and I continue to also have error.
@discordjs/opus
I doubt it'll hurt to have this but we'll see I guess
71e744a chore: add "opus/silk/arm/NSQ_neon.c" to arm64 ... - deepso7
Thanks for approving. Anything missing for merging this?
Any chance we can get a release published with this merged change?
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)
Description
- [X] Code changes have been tested, or there are no code changes
Description
- [X] Code changes have been tested, or there are no code changes
Windows build fails. Interesting...
Removed 18 by mistake here. I'll fix it tomorrow.
The general cleanup is a 👍, thanks a bunch! But just a small request for whenever you can
Let's throw in 23 and 24 too please
Once 24 was released, there's no reason to test also 23, which is a prerelease version of 24.
Description
libopus has struct OpusEncoder and the package has class OpusEncoder which contains the lib's struct.
Rename the class NodeOpusEncoder, keeping exposed names untouched.
- [X] Code changes have been tested, or there are no code changes
Description
Use Github Actions arm runner instead of cross-compiling.
- [X] Code changes have been tested, or there are no code changes
Interesting. This uncovers a real compilation error for linux/arm64. Fixed now. https://github.com/discordjs/opus/pull/180/files#diff-ac8b87ab9e0dc323134a4867b97987a445405f227c7fcbefc9970ecb57272dc6
Notice this PR depends on:
- #177
The arm changes are in a separate commit. You can review it here: https://github.com/discordjs/opus/pull/180/commits/8a0bdb42f682a74a2157e33d96af4abbc9ed94a6
All checks passed! \o/
8ad3d0d fix: name conflict between libopus and the pack... - orgads
This needs to stay, otherwise CI breaks. It also shouldn't ever try to fetch prebuilts in CI
Right, sorry. This whole target is removed in the followup commit so I missed it. Fixed now.
I wish I knew why MUSL aarch64 keeps failing to download that file, maybe UA header would help...
I wish I knew why MUSL aarch64 keeps failing to download that file, maybe UA header would help...
Don't bother. It is fixed in #180.
name: Build node ${{ matrix.node }} on ${{ matrix.os }}
Just checking, this will correctly throw if it fails to build?
You might wanna throw in macos-14 or 15 too to prebuild for macos on arm, and also ubuntu-22.04-arm, maybe even yolo in windows-11-arm but that last one is hella optional
Done as a separate commit. Let's see how it goes.
Is there a reason to build on both ubuntu-22.04 and ubuntu-24.04? Aren't they compatible?
might have different gcc versions
windows-11-arm requires a matching config.h. I'm leaving it out.
might have different gcc versions
Ok, but for that matter ubuntu-22.04 and ubuntu-22.04-arm are equivalent. Testing one of them should be enough.
Well here you'll want to add ubuntu-22.04-arm no?
No, if glibc version is compatible between 22.04 and 24.04, there's no need to add it. I think this one can also be removed.
Ok, I see that it is not the same version. I'll add it.
Description
- [X] Code changes have been tested, or there are no code changes
The package does build with older Node versions, but they are no longer tested. Should we raise the engine condition in package.json as well, or allow it to be installed on older versions?
As part of recent changes, is this oudated?
- #181
Please merge it so I can rebase libopus upgrade on top of this.
Description
- [X] Code changes have been tested, or there are no code changes
Probably should also update the list of platform support but thats a nit, lgtm
Possibly unrelated, but npm warn Unknown cli config "--build-from-source". This will stop working in the next major version of npm.
Description
- [X] Code changes have been tested, or there are no code changes
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
Description
Adds support for OpenBSD amd64 by adding the missing opus config.h file.
Some features are disabled in the discordjs opus build for OpenBSD that are available in the system opus so that no unavailable symbol errors occur.
Tests pass and works with a bot I use.
you can open a PR, ofc!
07d9aae chore(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 - dependabot[bot]
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...
f3b7cc7 chore(deps): bump glob from 10.4.5 to 10.5.0 - dependabot[bot]
Bumps glob from 10.4.5 to 10.5.0.
Commits
56774ef 10.5.0
1e4e297 bin: Do not expose filenames to shell expansion
See full diff in compare view
f183b93 feat(OpusEncoder): make rate and channels o... - almeidx
Description
- [ ] Code changes have been tested, or there are no code changes
The macos-13 runner image has been retired:
Updated the node.js versions to the ones that are still supported:
8b585b8 chore: add macos-26 to os matrix - almeidx
Possibly unrelated, but npm warn Unknown cli config "--build-from-source". This will stop working in the next major version of npm.
_Originally posted by @vladfrangu in https://github.com/discordjs/opus/pull/182#pullrequestreview-3010549206_
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
280ac0a refactor!: bump minimum node version to v20 - almeidx
BREAKING CHANGE: The minimum supported Node.js version is now v20.
3f4a3d4 refactor!: bump minimum node version to v20 (#192) - almeidx
Closes #171
Description
This PR adds bindings for opus_decode_float and opus_encode_float to support floating-point operations.
- [x] Code changes have been tested, or there are no code changes
Q
I see there are conflicts due to the recent code updates. I'll rebase and fix them shortly.
Sorry, but I just realized it's 3:00 AM here. I'll fix it later.
Regarding the remaining points raised by copilot:
deletevsdelete[]: 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? ...
Summary
- add Bun CI jobs to build/test on Ubuntu
- allow Bun installs/tests via scripts and N-API prebuild naming
- document Bun install/test workflow
Testing
- bun install --ignore-scripts && bun run install && bun run test
지적 감사합니다. bun 실패가 node 성공으로 마스킹되지 않도록 test를 node 전용으로 고정하고, bun은 test:bun으로 분리했습니다. CI/README도 test:bun으로 업데이트했습니다.
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...
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...
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...
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:
- Try to download the missing
glibc-2.41prebuilt - Fall back to compiling from source
- The compilati...
[Written by human]
And to add some context on why it is valuable -- the latest openclaw package introduced dependencies on discordjs/opus (https://github.com/openclaw/openclaw/commit/4ab946eebfe06ded3c47d7df2ba9ef0684006fb0), and this unblocks openclaw's deployment on RPi5.
+1 to this, causing me problems updating openclaw
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:
- OpenClaw issue: https://github.com/ope...
6c04715 chore(deps): bump minimatch - dependabot[bot]
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...
Team, merging is still blocked as I don't have a reviewer with write access to approve. @mattrickslauer wonder if you can help pointing me the way.
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 ...
8966170 chore(deps): bump minimatch - dependabot[bot]
2a238cd chore(deps-dev): bump flatted from 3.3.3 to 3.4.2 - dependabot[bot]
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 ...
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 ...
084bdbd chore(deps): bump picomatch - dependabot[bot]
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...
I support this. We need more support for Raspberry Pi (ARM64)...
I second this. I can't compile Opus on Raspberry Pi because of this issue.
+1. I need latest versions too. ;-;
084bdbde4a5fd8314946c9ce5567dc7ea24b5402
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.