Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/bench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ void whisper_print_usage(int /*argc*/, char ** argv, const whisper_params & para

static int whisper_bench_full(const whisper_params & params) {
// whisper init
#ifdef GGML_BACKEND_DL
whisper_load_backends();
#endif

struct whisper_context_params cparams = whisper_context_default_params();

Expand Down
4 changes: 4 additions & 0 deletions examples/cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,10 @@ int main(int argc, char ** argv) {

// whisper init

#ifdef GGML_BACKEND_DL
whisper_load_backends();
#endif

struct whisper_context_params cparams = whisper_context_default_params();

cparams.use_gpu = params.use_gpu;
Expand Down
4 changes: 4 additions & 0 deletions examples/stream/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ int main(int argc, char ** argv) {
exit(0);
}

#ifdef GGML_BACKEND_DL
whisper_load_backends();
#endif

struct whisper_context_params cparams = whisper_context_default_params();

cparams.use_gpu = params.use_gpu;
Expand Down
5 changes: 5 additions & 0 deletions include/whisper.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ extern "C" {
WHISPER_API void whisper_free_params(struct whisper_full_params * params);
WHISPER_API void whisper_free_context_params(struct whisper_context_params * params);

// Required for GGML_BACKEND_DL
#ifdef GGML_BACKEND_DL
WHISPER_API void whisper_load_backends();
#endif

// Convert RAW PCM audio to log mel spectrogram.
// The resulting spectrogram is stored inside the default state of the provided whisper context.
// Returns 0 on success
Expand Down
Loading