Commit 79b11911 for whisper.cpp
commit 79b11911d9d38c4be2fc7dc8b4efeff3324c090f
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Date: Thu Nov 26 11:14:52 2026 +0100
whisper : name greedy and beam_search structs (#4203)
* whisper : name greedy and beam_search structs
This commit adds names to these structs so that they are not anonymous.
The motivation for this is that currently if a change to the compilation
unit is made the apiabi check might fail as the anonymous types will
have been given new names.
For example, adding a typedef or another struct prior to these struct
in the compilation unit will trigger abidw to name these
structs differently:
```c++
typedef struct {} something;
```
abidw uses a naming pattern `_anon_#` where the number is incremented for
each anonymous type.
With the changes in this commit we will avoid this in the future but
these struct will now also be part of the public API which they were not
previously. This will also require a minor version bump. The benefit
will be that these types of false positive apiabi errors will not occur
and will hopefully make the release process easier and smoother saving
us from having to investigate why the checks are failing.
Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/45202526590/job/137789480167#step:4:339
* update struct names from PR feedback
diff --git a/include/whisper.h b/include/whisper.h
index 717f9bd0..34cf3db2 100644
--- a/include/whisper.h
+++ b/include/whisper.h
@@ -552,11 +552,11 @@ extern "C" {
float logprob_thold;
float no_speech_thold;
- struct {
+ struct whisper_params_greedy {
int best_of; // ref: https://github.com/openai/whisper/blob/f82bc59f5ea234d4b97fb2860842ed38519f7e65/whisper/transcribe.py#L264
} greedy;
- struct {
+ struct whisper_params_beam_search {
int beam_size; // ref: https://github.com/openai/whisper/blob/f82bc59f5ea234d4b97fb2860842ed38519f7e65/whisper/transcribe.py#L265
float patience; // TODO: not implemented, ref: https://arxiv.org/pdf/2204.05424.pdf