ariym/whisper-node

I followed the read me but has this error

Opened this issue · 5 comments

node main.js

[whisper-node] Transcribing: audios/elogio.wav

[whisper-node] Problem: TypeError: Cannot read properties of null (reading 'shift')
at parseTranscript (/home/jefaokpta/Downloads/whisper/node_modules/whisper-node/dist/tsToArray.js:7:11)
at /home/jefaokpta/Downloads/whisper/node_modules/whisper-node/dist/index.js:36:57
at Generator.next ()
at fulfilled (/home/jefaokpta/Downloads/whisper/node_modules/whisper-node/dist/index.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
undefined

same here

Likely the format of the audio file is wrong.

Try executing the model directly inside the /node_modules/whisper-node/lib/whisper.cpp/main -m models/ggml-base.en.bin -f /file.wav

and see if you get a transcription or an error

@jeffscottward

@Dletta I've tried with a few .wav files I know are properly formatted and still get this same error.

I tried using v1.1.0 and it wasn't crashing for me anymore but only returned an empty array

Have you tried:

Try executing the model directly inside the /node_modules/whisper-node/lib/whisper.cpp/main -m models/ggml-base.en.bin -f /file.wav

This way you might find why whisper is returning an empty array.