mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-16 22:01:30 +02:00
whisper : expose API to let user control log output (#1060)
* expose api to let user control log output Add whisper_set_log_callback() that lets user set a callback for log messages. Change all the fprintf(stderr, ...) to call via the above. * whisper : add <cstdarg> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
@ -517,6 +517,11 @@ extern "C" {
|
||||
WHISPER_API int whisper_bench_ggml_mul_mat (int n_threads);
|
||||
WHISPER_API const char * whisper_bench_ggml_mul_mat_str(int n_threads);
|
||||
|
||||
// Control logging output; default behavior is to print to stderr
|
||||
|
||||
typedef void (*whisper_log_callback)(const char * line);
|
||||
WHISPER_API void whisper_set_log_callback(whisper_log_callback callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user