mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-17 03:19:10 +01:00
whisper : fix bug from previous commit
This commit is contained in:
parent
b5bd2f43c5
commit
3e82ff4747
@ -2609,6 +2609,8 @@ struct whisper_context * whisper_init_from_file_no_state(const char * path_model
|
|||||||
|
|
||||||
whisper_model_loader loader = {};
|
whisper_model_loader loader = {};
|
||||||
|
|
||||||
|
loader.context = &fin;
|
||||||
|
|
||||||
loader.read = [](void * ctx, void * output, size_t read_size) {
|
loader.read = [](void * ctx, void * output, size_t read_size) {
|
||||||
std::ifstream * fin = (std::ifstream*)ctx;
|
std::ifstream * fin = (std::ifstream*)ctx;
|
||||||
fin->read((char *)output, read_size);
|
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 = {};
|
whisper_model_loader loader = {};
|
||||||
|
|
||||||
fprintf(stderr, "%s: loading model from buffer\n", __func__);
|
|
||||||
|
|
||||||
loader.context = &ctx;
|
loader.context = &ctx;
|
||||||
|
|
||||||
loader.read = [](void * ctx, void * output, size_t read_size) {
|
loader.read = [](void * ctx, void * output, size_t read_size) {
|
||||||
|
Loading…
Reference in New Issue
Block a user