628 Commits
Author SHA1 Message Date
Aurora-NICExqandAurora-NICExq 5670d5c0bb fix(yt-wsp): Resolve script path without GNU realpath (#4072)
macOS ships BSD realpath, which rejects -e and is missing on older
releases. Use plain realpath when present, otherwise cd and pwd -P.

Fixes #530

Co-authored-by: Aurora-NICExq <Aurora-NICExq@users.noreply.github.com>
2026-09-18 12:20:25 +02:00
Erik WeathersandCursor b27fbff411 cli : load backends after validating input files (#4069)
* cli : load backends after validating input files

Co-authored-by: Cursor <cursoragent@cursor.com>

* cli : check model path with input files

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 11:14:21 +02:00
Abir DeolandDaniel Bevenius d5d6e59bfa docs : clarify VAD mode timestamps and CWD model path errors (#4019)
* docs(stream): clarify VAD mode timestamps and CWD model path errors

AI use: I found this while building against the library and used an AI
assistant to help verify the relevant source (file/line refs
above). The report and the documentation wording are mine, and I've checked every claim against the source myself.

* Update examples/stream/README.md

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>

---------

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2026-09-18 07:47:04 +02:00
Spencer BryngelsonandDaniel Bevenius 4afa009405 whisper : optional ANEForge encoder backend (Apple Neural Engine) (#3905)
* whisper : optional ANEForge encoder backend (Apple Neural Engine)

Runs the Whisper encoder directly on the Apple Neural Engine via ANEForge, an
alternative to the CoreML encoder backend. About 2x faster than the CoreML encoder
and faster than the Metal GPU encoder on M-series, at ~5x lower energy, with the
same transcripts (cosine 0.999 vs the reference encoder).

Mirrors the existing CoreML/OpenVINO seam: fills embd_enc from the external aneforge
package via the same whisper_encode_external path, gated at runtime by the
ANEFORGE_ENCODER env var. With the variable unset the build behaves exactly like
stock whisper.cpp (the backend dlopens its dispatch dylib only when enabled, no new
link-time dependency). Encoder only; the decoder is untouched.

Adds src/aneforge/whisper-aneforge.{h,cpp}, one line to src/CMakeLists.txt, and ~30
lines to src/whisper.cpp (include, state field, encode branch, init, free).

* aneforge: one statement per line, align dlsym block (review)

* aneforge: guard the backend to Apple Silicon, stub elsewhere (fix non-Apple CI)

whisper-aneforge.cpp uses <dlfcn.h> and __fp16, which are unavailable on Windows
(MSVC) and non-ARM Linux, so the unconditional build broke those CI jobs. Wrap the
real implementation in #if defined(__APPLE__) && defined(__aarch64__) and provide
no-op stubs elsewhere; the encoder is Apple-Neural-Engine-only anyway, and the
library now links on every platform.

* examples : include whisper-aneforge.cpp in android examples

Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/32758607709/job/97689705921?pr=3905#step:5:200

* ci : specify explicit packages (platform-tools)

This commit updates the android jobs to specify platform-tools as an
explicit package.

The motivation for this to try to fix the Setup Android SDK step which
is also trying to install an obolete tools package.

Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/35215042978/job/105181619536?pr=3905

---------

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2026-09-18 06:18:56 +02:00
Álvaro Justen 61e6ccade0 server : return language in detect response (#4035)
Resolves: https://github.com/ggml-org/whisper.cpp/issues/3603
2026-09-08 07:12:52 +02:00
Georgi Gerganov 978113305b talk-llama : sync llama.cpp 2026-08-25 15:28:56 +03:00
Kayvan Zahiri 81a3fadf61 server : only enable token timestamps when the response needs them (#3990)
max_len defaults to 60 in the server, and that only takes effect on the token
timestamps path. Until v1.8.3 token timestamps were limited to verbose_json, so
the default never reached other formats. #3679 removed that condition, which
left every response wrapped at 60 characters, on a token boundary rather than a
word one.

Resolve the default after the other parameters and enable it only for
verbose_json, or when max_len or split_on_word was asked for. Clients passing
max_len with any format still get wrapping.
2026-08-21 14:32:37 +02:00
vk d61695dd87 docs : fix typos in readme files (#4004)
Nine spelling mistakes across the main readme and seven example readmes:
geneated -> generated, recieved -> received, difinitions -> definitions,
continously -> continuously, ect -> etc, and "lasted"/"recommanded" ->
"latest"/"recommended" in the CANN section.

Found with codespell; each one read in context first. Docs only.

Assisted-by: Claude (Anthropic)
2026-08-21 09:57:44 +02:00
Daniel Bevenius 81c190560a cmake : update semver and release process [no ci] (#3996)
* cmake : update semver handling to be consistent with ggml/llama.cpp

This commit modifies the semantic version handling to be consistent with
how llama.cpp and ggml handle semver.

This commit introdues a new example named test-cmake which is intended
to be used to test the cmake configuration and installation.

* ci : update release workflow to be consistent with llama.cpp

work in progress...

* ci : fix if statement in release.yml

* ci : comment out all but one build in release.yml

This is just for testing and this commit should not be included in the
main PR later.

* ci : use DEPLOY_KEY_RELEASE

This commit updates the release and make-release workflows to use the
DEPLOY_KEY_RELEASE secret. Two github ruleset have been imported.

* ci : add github rulesets for releases

These were retrived from llama.cpp and then imported into my fork for
testing. If all works well they will be imported into whisper.cpp
upstream as well.

* fix move artifacts step

* examples : use FetchContent for llama.cpp in talk-llama

This commit updated the example talk-llama to remove the vendored
llama.cpp and instead use FetchContent to pull it in from the
upstream repo.

* ci: add GGML_NATIVE=OFF to build-clang.yml

This commit disables native CPU instructions from the ubuntu-22-clang
job.

The motivation for this is that currently it is possible that the
running compiling llama.cpp (via ccache) might have support for cpu
instructions that are not available on the target runner.

Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/32224048267/job/95980031403?pr=3996

* ci : add missing GGML_NATIVE=OFF to jobs

* ci : add attestation for signed release artifacts

This commit add attenstions of artifacts to the release workflow.

After building the artifacts can be verified with the following command:
```console
$ curl -sSL -o whisper-bin-ubuntu-x64.tar.gz \
    https://github.com/danbev/whisper.cpp/releases/download/b4947/whisper-bin-ubuntu-x64.tar.gz

$ gh attestation verify --repo danbev/whisper.cpp whisper-bin-ubuntu-x64.tar.gz
Loaded digest sha256:722a6812263195d7ee2192b57fc64a6d6b09a6cdf2f55a152f793db27a651e31 for file://whisper-bin-ubuntu-x64.tar.gz
Loaded 1 attestation from GitHub API

The following policy criteria will be enforced:
- Predicate type must match:................ https://slsa.dev/provenance/v1
- Source Repository Owner URI must match:... https://github.com/danbev
- Source Repository URI must match:......... https://github.com/danbev/whisper.cpp
- Subject Alternative Name must match regex: (?i)^https://github\.com/danbev/whisper\.cpp/
- OIDC Issuer must match:................... https://token.actions.githubusercontent.com

✓ Verification succeeded!

The following 1 attestation matched the policy criteria

- Attestation #1
  - Build repo:..... danbev/whisper.cpp
  - Build workflow:. .github/workflows/release.yml@refs/heads/master
  - Signer repo:.... danbev/whisper.cpp
  - Signer workflow: .github/workflows/release.yml@refs/heads/master
```

* cmake : add WHISPER_USE_SYSTEM_LLAMA option [no ci]

This commit adds a new CMake option WHISPER_USE_SYSTEM_LLAMA that allows
the talk-llama example to use a system-installed llama.cpp library.

Setting this will automatically also set WHISPER_USE_SYSTEM_GGML to ON
and the system ggml library will be used in addition to the system
llama.cpp.

* ci : remove unused ccache step

* Revert "ci : comment out all but one build in release.yml"

This reverts commit 24b56776e1.

* ci : set WHISPER_BUILD_IS_DEV=OFF in release.yml
2026-08-20 09:34:27 +02:00
Georgi Gerganov 4834a2327d talk-llama : sync llama.cpp 2026-08-18 15:33:21 +03:00
Georgi Gerganov 1fe009caed talk-llama : fix build (#0) 2026-08-14 22:16:06 +03:00
Georgi Gerganov 592feef04a talk-llama : sync llama.cpp 2026-08-07 21:59:49 +03:00
Georgi Gerganov 6b92fec9e7 talk-llama : sync llama.cpp 2026-08-04 13:37:47 +03:00
Igor Koshenskii 29579831e3 examples : fix VAD min silence argument parsing (#3963)
Fix --vad-min-silence-duration-ms (-vsd) parsing in whisper-vad-speech-segments.

The option was incorrectly assigned to vad_min_speech_duration_ms instead of vad_min_silence_duration_ms. As a result, the requested silence duration was ignored and the minimum speech duration was overwritten.
2026-08-03 08:12:43 +02:00
Cappuccino 080bbbe852 examples : Remove leading space from txt output (#3921)
* Fix #587: Remove leading space from txt output

The BPE tokenizer used by Whisper produces tokens with leading spaces,
causing each line in the txt output to start with an unwanted space.

This fix strips leading whitespace (spaces and tabs) from each segment
when writing to txt output files, improving the readability of the
transcription output.

Fixes: https://github.com/ggml-org/whisper.cpp/issues/587
2026-07-11 17:53:59 +02:00
Georgi Gerganov 289ecb05c9 talk-llama : sync llama.cpp 2026-07-10 13:06:42 +03:00
Georgi Gerganov ade3292d03 common : adapt to q2_0 (ggml/0) 2026-07-10 13:06:42 +03:00
Daniel Bevenius 167d225f3a ci, examples : add package-lock.json to examples addon node (#3919)
* ci, examples : add package-lock.json to examples addon node

This commit commits the package-lock.json file for examples/addon.node.

This is needed to make the CI workflow work properly and after we
started pinning the action versions in the workflow, the CI started
failing because the package-lock.json was not committed. At least that
is what I think is happening.

* ci: use node 20.x and 22.x instead of 16.x and 18.x

* fix CMakeLists.txt target properties for addon.node
2026-07-01 09:04:21 +02:00
Yongmin Yoo 유용민 65dc3fece6 examples : Improved inference performance of Android example project (#3913)
* fix/android-debug-inference-issue: Applied BUILD_TYPE=Release to NDK build of whisper.android example

* fix/android-debug-inference-issue: Applied BUILD_TYPE=Release to NDK build of whisper.android.java example
2026-06-30 12:12:04 +02:00
Georgi Gerganov 0ae02cdb2c talk-llama : sync llama.cpp 2026-06-26 16:03:57 +03:00
QuantiusBenignus e3ab311094 examples : fix argument flag for min speech duration in VAD (#3907)
Fixed the -vspd flag for vad_min_speech_duration_ms, to prevent hiding vad_min_silence_duration_ms.
In usage () clarified the output timestamp units.
Fixed a few typos.
2026-06-26 08:09:03 +02:00
Daniel Bevenius 43d78af5be examples : update model names in parakeet-cli README.md [no ci] (#3906)
This commit updates the parakeet model names which are currently missing
the 'ggml-' prefix.
2026-06-23 09:12:31 +02:00
Georgi Gerganov 5ed76e9a07 talk-llama : sync llama.cpp 2026-06-19 12:53:43 +03:00
Daniel BeveniusandGeorgi Gerganov 9efddafb91 parakeet : add support for NVIDIA Parakeet (#3735)
* parakeet : add support for NVIDIA Parakeet


Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2026-06-16 20:44:10 +02:00
Rum Nguyen db5a84bd79 cli : add --version flag (#3878)
Adds a `--version` option to whisper-cli that prints the library version
via `whisper_version()` and exits, plus a corresponding entry in the help
output. Mirrors the existing `-h`/`--help` handling.

Closes #608
2026-06-16 08:58:09 +02:00
Georgi Gerganov 0ec0845110 talk-llama : sync llama.cpp 2026-06-15 10:33:53 +03:00
Georgi Gerganov 84bd03a438 talk-llama : sync llama.cpp 2026-06-08 14:36:36 +03:00
Noah Lyons e5d4412578 server : merge split utf-8 token text in verbose json (#3850) 2026-06-02 13:10:27 +02:00
Georgi Gerganov 6c343e7a4e common : pass sample rate to ffmpeg_decode_audio() 2026-05-31 15:49:13 +03:00
Georgi Gerganov f39cc71282 common : re-implement ffmpeg-transcode.cpp + clarify ffmpeg usage (#3846)
* examples : remove ffmpeg-transcode.cpp

* examples : implement ffmpeg-transcode.cpp

Assisted-by: llama.cpp:local pi

* common : switch from WHISPER_FFMPEG -> WHISPER_COMMON_FFMPEG
2026-05-31 15:44:07 +03:00
Georgi Gerganov 5828fba79f talk-llama : sync llama.cpp 2026-05-29 09:47:30 +03:00
27101c01dc cli : merge tokens split across UTF-8 boundaries in JSON output (#3751)
* cli : merge tokens split across UTF-8 boundaries in JSON output

When a multi-byte UTF-8 codepoint (most commonly a CJK character, 3 bytes)
is split across multiple whisper tokens, the -ojf/--output-json-full
writer emitted each token's partial bytes as its own JSON string, producing
invalid UTF-8 that chokes downstream parsers.

Merge adjacent tokens in output_json whenever the accumulated text still
ends on an incomplete UTF-8 sequence. The merged entry keeps the first
token's id/p/t_dtw and extends t1 to the last absorbed token, which
matches how segment text is assembled elsewhere.

Refs #1798

* fix: address review — add braces for consistency, use full issue URL

- Add braces to if/else chain for codebase consistency
- Use full URL for issue #1798 reference

Review: @danbev

---------

Co-authored-by: texasich <texasich@users.noreply.github.com>
Co-authored-by: texasich <texasich@gmail.com>
2026-05-26 06:23:41 +02:00
Georgi Gerganov 865ec171aa talk-llama : sync llama.cpp 2026-05-25 12:26:07 +03:00
Pascal 0ccd896f5b common : fix server /inference fails to decode in-memory audio (regression) (#3818)
* common: add memory buffer overload of read_audio_data

whisper-server /inference without --convert passed the uploaded file
bytes to read_audio_data as a filename, so ma_decoder_init_file tried
to open a path starting with "RIFF" and failed. every request returned
HTTP 400 "Invalid request" on builds without WHISPER_FFMPEG, which is
the default.

factor the PCM extraction into a shared helper and add an overload that
decodes straight from a memory buffer via ma_decoder_init_memory, which
the function already used for the stdin path. server now calls it with
the upload content. the filename overload behavior is unchanged.
2026-05-22 08:27:35 +02:00
petterreinholdtsenandDaniel Bevenius 47b9eb37a3 examples : fix memory leak in read_audio_data (#3810)
This commit addresses a memory leak in the `read_audio_data` function
where it is currently possible that a call to `ma_decoder_init_file`
succeeds and the function returns early without calling
`ma_decoder_uninit`. A similar situation can occur with
`ma_decoder_init_memory`.

Refs: https://bugs.debian.org/1124796

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2026-05-18 12:16:39 +02:00
Andreas Lubbe 6227a0ef73 server : Return speaker information in JSON (#3782) 2026-05-18 09:18:04 +02:00
Andreas Lubbe 968eebe772 server: add support for carry_initial_prompt (#3781)
* Add support for carry_initial_prompt on the server

* Update README
2026-05-15 14:03:17 +02:00
Georgi Gerganov 46ca43d639 talk-llama : sync llama.cpp 2026-05-14 21:26:48 +03:00
Georgi Gerganov 54ecc9dba4 talk-llama : sync llama.cpp 2026-05-14 21:26:48 +03:00
Andreas Lubbe 3e9b7d0fef server : fix no_speech_thold not being read (#3783) 2026-05-13 10:37:28 +02:00
Andreas Lubbe a604a9b5b0 server: fix params leak between requests (#3784) 2026-05-13 08:54:56 +02:00
Andreas Lubbe 338cce1e58 server: Add support for controlling token_timestamps directly (#3785) 2026-05-12 07:36:00 +02:00
Georgi Gerganov 4bf733672b talk-llama : sync llama.cpp 2026-05-02 15:02:42 +03:00
Georgi Gerganov c59a773605 examples : update to Q1_0 2026-05-01 13:07:33 +03:00
jinweihan fc674574ca bench : sync submit-results URL to ggml-org (#3769)
The project moved from ggerganov/ to ggml-org/ and the README already
references the new URL in both places it mentions issue #89 (README.md
and examples/bench/README.md). Syncing the two remaining hardcoded URLs
in examples/bench/bench.cpp and examples/bench.wasm/emscripten.cpp.

The old URL still redirects, so this is cosmetic.
2026-04-20 07:12:57 +02:00
Georgi Gerganov 4bbce1e5b2 benches : update 2026-03-18 22:34:51 +02:00
Gaël James 21665eab4c examples : Allow max_len to be used for any output format (#3679) 2026-03-16 13:33:56 +02:00
Igor Loskutov 136dc2eb12 server: return proper HTTP status codes for error responses (#3707)
Several error paths in the /inference and /load endpoints returned
HTTP 200 with a JSON error body, making it impossible for clients
to distinguish errors from successful responses by status code.

Set 400 for client errors (missing file field, unreadable audio,
missing/invalid model) and 500 for server errors (ffmpeg conversion
failure). The two existing status-code sites (499 for client
disconnect, 500 for processing failure) are unchanged.
2026-03-16 13:33:06 +02:00
Georgi Gerganov 2bc630f197 talk-llama : sync llama.cpp 2026-03-16 13:10:15 +02:00
Georgi Gerganov 81ea958719 common : add nvfp4 (ggml/0) 2026-03-16 13:10:15 +02:00