Closed hjkoskel closed 1 month ago
@hjkoskel This is a great idea. Can you open a PR?
I would opt for the following signatures (in snake case to respect the writing style):
int bark_load_model_from_file(char *fname, void **ctx);
int bark_generate_audio_from_prompt(void *ctx, char *prompt, int32_t seed, int n_threads, float **out);
int bark_free_model(void *ctx);
Hello @hjkoskel ! I just merged #170 which make bark.h
a C-header. If you generate bindings for another language, feel free to open a PR, so that we can add them to the repo.
It would be nice if bark.cpp had C-api like in whisper.cpp have. Even it is written in C++. C-api would enable bindings for to use library directly from other languages like golang, zig etc...
bindings in whisper.cpp
Could C api be like this? I like idea to having able to set random generator seed on each generate command if needed.
binding.h
binding.c