audiojs / audio-speaker

Output audio stream to speaker, browser/node-wise
103 stars 14 forks source link

Cannot set property writableObjectMode of #<Duplex> which has only a getter #63

Open SinanAkkoyun opened 5 months ago

SinanAkkoyun commented 5 months ago

TypeError: Cannot set property writableObjectMode of # which has only a getter at Object. (./node_modules/audio-through/index.js:162:38) at Module._compile (node:internal/modules/cjs/loader:1368:14) at Object.S (./node_modules/tsx/dist/cjs/index.cjs:1:1292) at Module.load (node:internal/modules/cjs/loader:1205:32) at Module._load (node:internal/modules/cjs/loader:1021:12) at Module.require (node:internal/modules/cjs/loader:1230:19) at require (node:internal/modules/helpers:179:18) at Object. (./node_modules/audio-speaker/stream.js:10:15) at Module._compile (node:internal/modules/cjs/loader:1368:14) at Object.S (./node_modules/tsx/dist/cjs/index.cjs:1:1292)

Node.js v21.7.1

SinanAkkoyun commented 5 months ago

Also, is there a way to actually use this in NodeJS with normal PCM buffers instead of AudioBuffer?

y-lobau commented 5 months ago

Same issue for me on mac, same Node version. Doing just this:

import createSpeaker from 'audio-speaker';
let output = createSpeaker();
acornejo commented 3 months ago

Ditto.

I suspect, also using node V21.

I suspect something change in the most recent releases of nodejs that prevents this library from working :(

acornejo commented 3 months ago

Ohh, its easier than that writable.writableObjectMode is a read only property, and has been that way for a long time, so I guess it just means nodejs added stricter checking.