sandrohanea / whisper.net

Whisper.net. Speech to text made simple using Whisper Models
MIT License
512 stars 78 forks source link

OpenBLAS support #63

Open jdluzen opened 1 year ago

jdluzen commented 1 year ago

I've managed to hack OpenBLAS support into the cmake files for linux-x64. For some reason, find_package(BLAS) does not work, and I had to set some variables manually. This resulted in greatly improved processing time on a 2 thread VM. On a random audio file I've been testing with, originally it took 1511 seconds, now it takes 770 seconds!

I'm very rusty with CMake, so I'm open to ideas.

drasticactions commented 1 year ago

For compiling Whisper.cpp, I would ask in their repo.

Their docs for it mention the WHISPER_OPENBLAS=1 flag, which for cmake would be adding -DWHISPER_OPENBLAS=1 to the existing Linux cmake command. As for how you build that in your distribution or what dependencies you need, I'm not sure. I would ask about it in their issues page.

jdluzen commented 1 year ago

Thanks for the ideas. Whisper.cpp did compile with OpenBLAS using WHISPER_OPENBLAS=1 make out of the box and verified with ldd. Unfortunately, it would not load in whisper.net, but I did not expect it to based on the Readme. So then I attempted to enable it with the whisper.cpp subrepo that whisper.net provides. It could very well be distro related, I am on a relatively recent Ubuntu. But I would like to fully reinstall+upgrade to see if it is part of the issue.