bark.cpp icon indicating copy to clipboard operation
bark.cpp copied to clipboard

Crash with simple test

Open marcobambini opened this issue 7 months ago • 1 comments

I wrote a very simple C example:

struct bark_context_params ctx_params = bark_context_default_params();
    struct bark_context *bctx = bark_load_model(model_path, ctx_params, 0);
    if (!bctx) {
        fprintf(stderr, "%s: Could not load model\n", __func__);
        exit(1);
    }
    
    // generate audio
    if (!bark_generate_audio(bctx, text, 4)) {
        fprintf(stderr, "%s: An error occured. If the problem persists, feel free to open an issue to report it.\n", __func__);
        exit(1);
    }
    
    const float *audio_data = bark_get_audio_data(bctx);
    if (audio_data == NULL) {
        fprintf(stderr, "%s: Could not get audio data\n", __func__);
        exit(1);
    }
    const int audio_arr_size = bark_get_audio_data_size(bctx);

The model_path is the full path to ggml_weights.bin and the text string is a simple "Hello World, my name is Marco". As you can see from the screenshot, the crash occurs inside ggml_hash_insert with i = 338607911

Image

I am a bit lost and any help would be really appreciated.

marcobambini avatar Mar 24 '25 08:03 marcobambini