whisper : update example in whisper.h (#1529)

update the example in the header, previous examples deprecated.
This commit is contained in:
M. A. Ali 2023-11-20 20:52:27 +02:00 committed by GitHub
parent a01b2e0971
commit fa19bc4195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) { // if (whisper_full(ctx, wparams, pcmf32.data(), pcmf32.size()) != 0) {
// fprintf(stderr, "failed to process audio\n"); // fprintf(stderr, "failed to process audio\n");