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

@@ -198,6 +198,8 @@ extern "C" {
float samples_overlap; // Overlap in seconds when copying audio samples from speech segment.
} whisper_vad_params;
WHISPER_API const char * whisper_version(void);
// Various functions for loading a ggml whisper model.
// Allocate (almost) all memory needed for the model.
// Return NULL on failure