-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccessViolation when try to cancel ProcessAsync() #23
Comments
I tried using |
Yes, the problem is that the underlying whisper.cpp library was not supporting cancellation so even if you cancel whisper.net processor, the processing is still running under the hood. Will check if whisper.cpp have any plans of adding cancellation options. and will keep this updated. |
I added a commit to fix it and will release it in 1.3.0 version. However, after cancelling, you'll have to call DisposeAsync() instead of Dispose now on the processor as otherwise Dispose method will throw (as the processing is still happening). DisposeAsync will wait until all resources can be safely released. Also, a newer encoder will be cancelled now, so the rest of processing will finish faster, but the decoders cannot be cancelled (as whisper.cpp is not supporting that option yet). |
- Improved cancellation using CancellationToken provided => it's using the onabort handler in native library to cancel the processing faster => addressing concerns from #23 - Logging improvements: not logging to stderr by default anymore, but events can be registered (see [LogProvider](https://github.com/sandrohanea/whisper.net/tree/main/Whisper.net/Logger/LogProvider)) => Added optional logging in simple samples + CoreML sample => Logging is now suppressed by default: #129 - Added `useGpu` on WhisperFactory creation so that GPU usage can be disabled on specific runtimes (e.g. Cublas, CoreML, etc) - Upgraded dotnet targets to dotnet 8 - Added support for whisper large v3 (including downloader + coreml model) => Old model Large in downloader should be renamed to LargeV2 see [GgmlType](https://github.com/sandrohanea/whisper.net/blob/main/Whisper.net/Ggml/GgmlType.cs) - Added linux-x64 support for Whisper.net.Runtime.Cublas - Added support for distil-whisper #126 => No downloader added, you'll need to load the model yourself => How to build the model: https://github.com/ggerganov/whisper.cpp/tree/master/models#distilled-models - **Added automated builds for all runtimes using Github Actions** - Unified runtime builds with make for linux, macos, ios, tvos, wasm and powershell scripts for windows - Added Blazor with InteractivityAuto, InteractivityServer and InteractivityWebAssemly sample with Blazor updated in dotnet 8. - Unified Whisper.net.Runtime.Wasm with Whisper.net.Runtime => If previously you were using Whisper.net.Runtime.Wasm, just replace it with Whisper.net.Runtime - Added metal support for arm-based apple platforms (both Whisper.net.Runtime + Whisper.net.Runtime.CoreML)
* - Upgraded to Whisper.cpp 1.5.1 - Improved cancellation using CancellationToken provided => it's using the onabort handler in native library to cancel the processing faster => addressing concerns from #23 - Logging improvements: not logging to stderr by default anymore, but events can be registered (see [LogProvider](https://github.com/sandrohanea/whisper.net/tree/main/Whisper.net/Logger/LogProvider)) => Added optional logging in simple samples + CoreML sample => Logging is now suppressed by default: #129 - Added `useGpu` on WhisperFactory creation so that GPU usage can be disabled on specific runtimes (e.g. Cublas, CoreML, etc) - Upgraded dotnet targets to dotnet 8 - Added support for whisper large v3 (including downloader + coreml model) => Old model Large in downloader should be renamed to LargeV2 see [GgmlType](https://github.com/sandrohanea/whisper.net/blob/main/Whisper.net/Ggml/GgmlType.cs) - Added linux-x64 support for Whisper.net.Runtime.Cublas - Added support for distil-whisper #126 => No downloader added, you'll need to load the model yourself => How to build the model: https://github.com/ggerganov/whisper.cpp/tree/master/models#distilled-models - **Added automated builds for all runtimes using Github Actions** - Unified runtime builds with make for linux, macos, ios, tvos, wasm and powershell scripts for windows - Added Blazor with InteractivityAuto, InteractivityServer and InteractivityWebAssemly sample with Blazor updated in dotnet 8. - Unified Whisper.net.Runtime.Wasm with Whisper.net.Runtime => If previously you were using Whisper.net.Runtime.Wasm, just replace it with Whisper.net.Runtime - Added metal support for arm-based apple platforms (both Whisper.net.Runtime + Whisper.net.Runtime.CoreML) * Commented local_whisper nuget source + reset github actions to execute against PRs * Fixed linux build + changed native github actions to work with PRs as well, not only branches * Add native changes wasm * Add native changes android * Add native changes windows * Add native changes macos * Updated readme * Add native changes linux --------- Co-authored-by: sandrohanea <[email protected]>
Whisper.Net version: 1.2.2
Environment: win10-x64
.NET version: Framework 4.7.2
Model: Small.bin
wav file language: Japanese
Use Whisper.net.Demo sample code, in Program.cs, pass a 1 minute cancellation token to ProcessAsync():
After 1min, the Demo crashed by AccessViolationException:
0x00007FFB245934AE (whisper.dll)处(位于 Whisper.net.Demo.exe 中)引发的异常: 0xC0000005: 读取位置 0x000001D0863A1D90 时发生访问冲突。
The text was updated successfully, but these errors were encountered: