ChetanXpro / nodejs-whisper

NodeJS Bindings for Whisper - the CPU version of OpenAI's Whisper, as initially crafted in C++ by ggerganov.
https://npmjs.com/nodejs-whisper
MIT License
93 stars 22 forks source link

[Suggestion] Support for multiple models to exist #97

Closed SimonRosengren closed 2 months ago

SimonRosengren commented 4 months ago

I've noticed that there is a check for any model existing as part of the autoDownload. However, it only checks if there are > 0 models rather than checking if the autoDownloadModelName already exists.

if (existingModels.length > 0) {
    if (verbose) {
        console.log('[Nodejs-whisper] Models already exist. Skipping download.')
    }
    return 'Models already exist. Skipping download.'
}

It this by design or is it a bug? My suggestion would be to allow more than one model existing.

SimonRosengren commented 4 months ago

I added a Pull Request for this as well in case you'd be interested

ChetanXpro commented 3 months ago

@SimonRosengren Thanks for pointing out this issue. Yeah, initially it was by design, but I completely agree with you. I will review the PR soon.

ChetanXpro commented 2 months ago

@SimonRosengren Merged the PR