]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : update example in whisper.h (#1529)
authorM. A. Ali <redacted>
Mon, 20 Nov 2023 18:52:27 +0000 (20:52 +0200)
committerGitHub <redacted>
Mon, 20 Nov 2023 18:52:27 +0000 (20:52 +0200)
update the example in the header, previous examples deprecated.

whisper.h

index 84540989d2ed339fb1ef4e834fa222af44e49e7b..41eb88a667560ffa4b6b299ab130cce2ad4a8e6b 100644 (file)
--- a/whisper.h
+++ b/whisper.h
@@ -50,7 +50,9 @@ extern "C" {
     //
     //     ...
     //
-    //     struct whisper_context * ctx = whisper_init_from_file("/path/to/ggml-base.en.bin");
+    //     whisper_context_params cparams = whisper_context_default_params();
+    // 
+    //     struct whisper_context * ctx = whisper_init_from_file_with_params("/path/to/ggml-base.en.bin", cparams);
     //
     //     if (whisper_full(ctx, wparams, pcmf32.data(), pcmf32.size()) != 0) {
     //         fprintf(stderr, "failed to process audio\n");