Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I followed the read me but has this error #46

Open
jefaokpta opened this issue May 10, 2024 · 5 comments
Open

I followed the read me but has this error #46

jefaokpta opened this issue May 10, 2024 · 5 comments

Comments

@jefaokpta
Copy link

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

@jeffscottward
Copy link

same here

@Dletta
Copy link

Dletta commented Jun 17, 2024

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

@mason-at-pieces
Copy link

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

@mason-at-pieces
Copy link

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

@Dletta
Copy link

Dletta commented Jun 18, 2024

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.

Leask added a commit to Leask/whisper-node that referenced this issue Dec 28, 2024
This submission addresses the following two issues:

1.  The first line is not always empty. Directly shifting the first line can cause processing failures for short audio clips. A better approach is to use a blank line filter to remove any potential empty lines.

2.  A `null` model return does not necessarily indicate a runtime error. It may signify that some audio clips do not contain text recognizable by the model. In such cases, an empty response should be returned instead of triggering a code error.

Related issues:
1: ariym#46
2: ariym#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants