jaxcore / bumblebee-hotword-node

BumbleBee Hotword for NodeJS
Apache License 2.0
13 stars 4 forks source link

Not working #10

Open ObscurusGrassator opened 1 year ago

ObscurusGrassator commented 1 year ago

Not working on MacOS

package.json

{
    "scripts": {
        "start": "node ./index.js"
    },
    "dependencies": {
        "bumblebee-hotword-node": "0.2.1"
    }
}

index.js:

const Bumblebee = require('bumblebee-hotword-node');
const bumblebee = new Bumblebee();

bumblebee.addHotword('bumblebee');

bumblebee.on('hotword', function (hotword) {
    console.log('Hotword Detected:', hotword);
});

bumblebee.start();

Node.js v18.8.0:

npm start

> start
> node ./index.js

(node:65329) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
TypeError: Failed to parse URL from /Users/xxx/Desktop/test/node_modules/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.wasm
TypeError: Failed to parse URL from /Users/xxx/Desktop/test/node_modules/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.wasm
/Users/xxx/Desktop/test/node_modules/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.js:65
                        throw ex
                        ^

RuntimeError: abort(TypeError: Failed to parse URL from /Users/xxx/Desktop/test/node_modules/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.wasm). Build with -s ASSERTIONS=1 for more info.
    at process.abort (/Users/xxx/Desktop/test/node_modules/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.js:486:11)
    at process.emit (node:events:513:28)
    at emit (node:internal/process/promises:149:20)
    at processPromiseRejections (node:internal/process/promises:283:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)

Node.js v18.8.0

Node.js v16.18.0, v14.20.1

npm start

> start
> node ./index.js

/Users/xxx/Desktop/test/node_modules/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.js:65
                        throw ex
                        ^

Error: spawn rec ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn rec',
  path: 'rec',
  spawnargs: [
    '-q',             '-c',
    '1',              '-r',
    '16000',          '-t',
    'wav',            '-V0',
    '-L',             '-b',
    '16',             '-e',
    'signed-integer', '-'
  ]
}
ttimasdf commented 1 year ago

I can confirm the same error message exists on Linux + node 18.

However, after downgrading to node 14, the exception is gone. By the way I'm using the prebuilt version provided by microsoft mcr.microsoft.com/devcontainers/javascript-node:14

GitPaulo commented 6 months ago

Adding to this, confirmed not working on WSL Ubuntu + node 18.

RuntimeError: abort(TypeError: Failed to parse URL from [REDACTED]/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.wasm). Build with -s ASSERTIONS=1 for more info.
    at process.abort ([REDACTED]/bumblebee-hotword-node/lib/porcupine-v1.9/pv_porcupine.js:486:11)
JackBlundellReevex commented 6 months ago

Was this ever solved? Also having this issue on my end on my Macbook after setting node to 14.15.5.