Liu Song’s Projects


~/Projects/whisper.cpp

git clone https://code.lsong.org/whisper.cpp

Commit

Commit
eba62e0fa1531db4f7c987e657cc7437dd6c7bcb
Author
Georgi Gerganov <[email protected]>
Date
2022-10-30 08:23:52 +0200 +0200
Diffstat
 whisper.cpp | 2 +-
 whisper.h | 2 +-

close #113 : fix struct whisper_token_data


diff --git a/whisper.cpp b/whisper.cpp
index 31f6821f5cd27de54f1fb833cb58cdf9f16bf8f5..3663259976bfd73f6c3f57730d3e19a99fcb9c85 100644
--- a/whisper.cpp
+++ b/whisper.cpp
@@ -2210,7 +2210,7 @@     return 0;
 }
 
 #define WHISPER_BUILD
-    MODEL_SMALL,
+    { "no",  { 29,  "norwegian",      } },
 #include <algorithm>
     const int64_t t_start_sample_us = ggml_time_us();
 




diff --git a/whisper.h b/whisper.h
index cb2d74705a813e3ab6af53c8f8ec439ff77581d2..b49f35a848b5269a8a25bf9930f8a4bf6129d076 100644
--- a/whisper.h
+++ b/whisper.h
@@ -128,7 +128,7 @@     // These are provided for convenience and can be used after each call to whisper_decode().
     // 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