-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Is there a way to suppress Console logging? #129
Comments
Those logs are written by whisper.cpp library: https://github.com/ggerganov/whisper.cpp and currently there is no way of suppressing them. I recommend you opening an issue there and if some config / option is added, will be added to this library as well. |
Opened this issue: ggerganov/whisper.cpp#1448 My pinvoke-fu is pretty weak, but I'm thinking something like whisper_set_log_callback(nil), or if there is some way to set the callback to a .NET method, we could intercept whisper.cpp output to parse & debug, but not show it unless we wanted. |
- 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]>
Logging is now suppresed by default, you can register some log handler to the LogProvider if you want to show that logs or use them in your app. |
is that true? I just downloaded it today and I get a ton of logs that I came looking to stop: MacBook-Pro-3:whisper.cpp jameswolf$ ./main -m models/ggml-base.en.bin -f /Users/jameswolf/Desktop/redteam/audio/wake_word_detected16k.wav system_info: n_threads = 4 / 10 | AVX = 0 | AVX2 = 0 | AVX512 = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | METAL = 1 | F16C = 0 | FP16_VA = 1 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 0 | SSSE3 = 0 | VSX = 0 | CUDA = 0 | COREML = 0 | OPENVINO = 0 | main: processing '/Users/jameswolf/Desktop/redteam/audio/wake_word_detected16k.wav' (191700 samples, 12.0 sec), 4 threads, 1 processors, 5 beams + best of 5, lang = en, task = transcribe, timestamps = 1 ... [00:00:00.000 --> 00:00:09.620] Hello Red Team, can you hear me? whisper_print_timings: load time = 131.77 ms I would prefer if it just output the audio text: [00:00:00.000 --> 00:00:09.620] Hello Red Team, can you hear me? it also seems to imaging 5 seconds since the audio is only 12 seconds long (and it says 17 seconds out to [BLANK_AUDIO]) |
I have a working example of transcoding mic input in real time, but see lots of whisper logging in the console that I would rather not see, like this:
whisper_init_state: kv self size = 5.25 MB
whisper_init_state: kv cross size = 17.58 MB
whisper_init_state: loading Core ML model from 'ggml-base-encoder.mlmodelc'
whisper_init_state: first run on a device may take a while ...
whisper_init_state: Core ML model loaded
Is there some way to suppress this logging?
The text was updated successfully, but these errors were encountered: