From: Georgi Gerganov Date: Sat, 29 Apr 2023 07:42:14 +0000 (+0300) Subject: whisper : fix bug from previous commit X-Git-Tag: upstream/1.7.4~1478 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=3e82ff47474e6d83894cdf8ad3daa128bfa6c256;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : fix bug from previous commit --- diff --git a/whisper.cpp b/whisper.cpp index 820c48be..583f2d8e 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -2609,6 +2609,8 @@ struct whisper_context * whisper_init_from_file_no_state(const char * path_model whisper_model_loader loader = {}; + loader.context = &fin; + loader.read = [](void * ctx, void * output, size_t read_size) { std::ifstream * fin = (std::ifstream*)ctx; fin->read((char *)output, read_size); @@ -2647,8 +2649,6 @@ struct whisper_context * whisper_init_from_buffer_no_state(void * buffer, size_t whisper_model_loader loader = {}; - fprintf(stderr, "%s: loading model from buffer\n", __func__); - loader.context = &ctx; loader.read = [](void * ctx, void * output, size_t read_size) {