whisper : add version function (#3289)

* whisper : add version function

This commit adds a version function to the whisper API.

The motivation for this is that it might be convenient to have a way to
programmatically check the version.

Example usage:
```c++
printf("Using whisper version: %s\n", whisper_version());
```
Will output:
```console
Using whisper version: 1.7.6
```

* examples : add version to android example CMakeLists.txt
This commit is contained in:
Daniel Bevenius
2025-06-26 18:09:42 +02:00
committed by GitHub
parent 35034c5aea
commit 32cf4e2aba
5 changed files with 34 additions and 0 deletions

View File

@@ -8938,6 +8938,10 @@ void whisper_log_set(ggml_log_callback log_callback, void * user_data) {
ggml_log_set(g_state.log_callback, g_state.log_callback_user_data);
}
const char * whisper_version(void) {
return WHISPER_VERSION;
}
GGML_ATTRIBUTE_FORMAT(2, 3)
static void whisper_log_internal(ggml_log_level level, const char * format, ...) {
va_list args;