From: Georgi Gerganov Date: Sun, 30 Oct 2022 06:23:52 +0000 (+0200) Subject: close #113 : fix struct whisper_token_data X-Git-Tag: upstream/1.7.4~1873 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=eba62e0fa1531db4f7c987e657cc7437dd6c7bcb;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp close #113 : fix struct whisper_token_data --- diff --git a/whisper.cpp b/whisper.cpp index 31f6821f..36632599 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -2209,7 +2209,7 @@ int whisper_decode(struct whisper_context * ctx, const whisper_token * tokens, i return 0; } -whisper_token_data whisper_sample_best(struct whisper_context * ctx) { +struct whisper_token_data whisper_sample_best(struct whisper_context * ctx) { const int64_t t_start_sample_us = ggml_time_us(); // TODO: simplify diff --git a/whisper.h b/whisper.h index cb2d7470..b49f35a8 100644 --- a/whisper.h +++ b/whisper.h @@ -128,7 +128,7 @@ extern "C" { // You can also implement your own sampling method using the whisper_get_probs() function. // whisper_sample_best() returns the token with the highest probability // whisper_sample_timestamp() returns the most probable timestamp token - WHISPER_API whisper_token_data whisper_sample_best(struct whisper_context * ctx); + WHISPER_API struct whisper_token_data whisper_sample_best(struct whisper_context * ctx); WHISPER_API whisper_token whisper_sample_timestamp(struct whisper_context * ctx); // Return the id of the specified language, returns -1 if not found