tazz4843/whisper-rs

How to disable model and state logs

Opened this issue · 3 comments

Is there any way to disable initiation logs below? Setting suggested params did not seem to help

whisper_init_from_file_with_params_no_state: loading model from 'models/ggml-medium.bin'
whisper_model_load: loading model        
whisper_model_load: n_vocab       = 51865
whisper_model_load: n_audio_ctx   = 1500 
whisper_model_load: n_audio_state = 1024 
whisper_model_load: n_audio_head  = 16   
whisper_model_load: n_audio_layer = 24   
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 1024
whisper_model_load: n_text_head   = 16
whisper_model_load: n_text_layer  = 24
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 4 (medium)
whisper_model_load: adding 1608 extra tokens
whisper_model_load: n_langs       = 99
whisper_model_load:      CPU buffer size =  1551.93 MB
whisper_model_load: model size    = 1551.57 MB
whisper_init_state: kv self size  =  132.12 MB
whisper_init_state: kv cross size =  147.46 MB
whisper_init_state: compute buffer (conv)   =   25.54 MB
whisper_init_state: compute buffer (encode) =  170.21 MB
whisper_init_state: compute buffer (cross)  =    7.78 MB
whisper_init_state: compute buffer (decode) =   98.25 MB

What are the suggested params you tried to set?

These ones that are in the examples but I think they do not affect this part.

// Disable anything that prints to stdout.
params.set_print_special(false);
params.set_print_progress(false);
params.set_print_realtime(false);
params.set_print_timestamps(false);

Seems like I need to set ggml_log_level somehow but could not figure out how to do it.

I guess we should update that comment to note that doesn't disable everything. It's impossible to disable whisper's log output afaik entirely, but 0.11 comes with either whisper_rs::whisper_sys_log::install_whisper_log_trampoline or whisper_rs::whisper_sys_tracing::install_whisper_tracing_trampoline depending on your use case. You should be able to use one of those and disable them.