ariym / whisper-node

Node.js bindings for OpenAI's Whisper. (C++ CPU version by ggerganov)
https://npmjs.com/whisper-node
MIT License
242 stars 42 forks source link

[Mac - M ship] TypeError: Cannot read properties of null (reading 'shift') - tsToArray.js:7:11 #38

Closed PradalCyril closed 9 months ago

PradalCyril commented 9 months ago

Hello, I try to use this library on a nodejs project. I follow steps to install this lib, download large-v1 model. This is my code:

Capture d’écran 2024-02-09 à 12 27 35

And when I start my server to run this code. I have this error in the console and I don't understand why the lines var is undefined:

 [Function: whisper]
[whisper-node] Transcribing: /Users/*/example/Je_sais_plus.wav 

Promise { <pending> }
[whisper-node] Problem: TypeError: Cannot read properties of null (reading 'shift')
    at parseTranscript (/Users/*/myproject/node_modules/whisper-node/dist/tsToArray.js:7:11)

Do you know how to fix this error ? It's a problem with the whisper.cpp installation ?

PradalCyril commented 9 months ago

https://github.com/ariym/whisper-node/issues/36