sandrohanea / whisper.net

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

Update WhisperFactory.cs #41

Closed GFNiko closed 1 year ago

GFNiko commented 1 year ago

Since I needed a custom dll path, I noticed this isn't passed so far and the default path was always used. Positioning the if query after the variable declarations solved the problem for me. I think the if (!libraryLoaded.value.isSuccess) query before WhisperFactory.librayPath = libraryPath; was a bug.

sandrohanea commented 1 year ago

Indeed, it was a bug at that dynamic loading. Thanks for fixing it!

drasticactions commented 1 year ago

Ouch, sorry about that! I generally test on Mac so I always link the libraries instead of dynamically loading them, so I missed that case. Should have checked for that.