sandrohanea / whisper.net

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

Catching the native call exception #71

Closed trrahul closed 1 year ago

trrahul commented 1 year ago

If you give an invalid path or a path that does not exist yet to WhisperFactory.FromPath, the program waits until NativeMethods.whisper_init_state is called to fail. And it fails hard by throwing a non-recoverable AccessViolationExeption. If it is the correct approach, could you add a validation to the whisper factory to prevent this?