nodejs-whisper
nodejs-whisper copied to clipboard
When input WAV file is silent, it still throws an error
When the recorded WAV file is silent, no sound, this error is still being thrown: Operation failed: Transcription failed or produced no output
Full error details are:
err: {
"type": "Error",
"message": "Operation failed: Transcription failed or produced no output.",
"stack":
Error: Operation failed: Transcription failed or produced no output.
at /var/www/videomail/prod/source/node_modules/nodejs-whisper/dist/index.js:50:19
at Generator.next (<anonymous>)
at fulfilled (/var/www/videomail/prod/source/node_modules/nodejs-whisper/dist/index.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
}
When silent, I expect no error to be thrown and just an empty VTT file to be generated with no captions. It's ok to have no output, nothing wrong with that.
Thoughts?
I see you have this code:
const transcript = await executeCppCommand(command, logger, options.withCuda)
if (!transcript) {
throw new Error('Transcription failed or produced no output.')
}
https://github.com/ChetanXpro/nodejs-whisper/blob/main/src/index.ts#L42
I would differentiate between transcription error and having no output, both aren't the same.