Commit Graph

622 Commits

Author SHA1 Message Date
djd0723 e1a5901c61
Merge 1c53e05aee into 1fe009caed 2026-08-15 16:41:42 -04: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
Dominic Dones 1c53e05aee examples: make -hf resolve a cached model without --hf-file
Change the empty --hf-file branch of whisper_hf_resolve_model to be
cache-first and refuse ambiguity rather than pick the repo's first
ggml-*.bin. With no -hff: exactly one cached ggml-*.bin resolves it
(no network); more than one errors and lists the cached files; a cold
cache errors and lists the repo's available models instead of silently
downloading. This makes "download once with -hff, then just -hf" work.

Unlike llama.cpp's -hf <user>/<model>[:quant] default-quant pick
(find_best_model), whisper repos are many-models-one-repo with no
meaningful default, so we key off the cache and error+list on ambiguity.
The explicit -hff path (download-first, cache fall-back) is unchanged.

whisper_hf_resolve_model now prints a specific diagnostic for every
failure mode, so cli.cpp no longer prints its own generic (and now
inaccurate) "not found in HF cache" line; it just returns exit 3.

tests/test-hf-resolve.sh gains single-cached (-hf alone -> exit 0) and
multi-cached (-hf alone -> exit 3 + "multiple models cached" + list)
cases, and the missing-file assertion matches the new message.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 16:35:52 -04:00
Dominic Dones 4d4aa7bc46 examples: add HF HTTPS download with cache fall-back to whisper-cli
Enable the network half of the HF cache resolver. whisper_hf_resolve_model
now (unless HF_HUB_OFFLINE is set) lists the repo over the HF API, picks the
primary file (exact --hf-file, else first ggml-*.bin), downloads it into the
blobs/<oid> + snapshots/<commit> layout via a slim hf_cache::download_file,
and falls back to the Phase 1 on-disk cache scan on empty listing or network
failure. HF_TOKEN is honored for the Authorization: Bearer header.

HTTPS is gated behind a new WHISPER_OPENSSL CMake option (find_package OpenSSL,
CPPHTTPLIB_OPENSSL_SUPPORT, link OpenSSL::SSL/Crypto); an https attempt in a
non-SSL build prints the rebuild hint.

download_file follows redirects manually and disables httplib url-encoding:
cpp-httplib 0.20 (whisper's vendored version) both mishandles cross-host
redirects and re-encodes the already-encoded signed xet CDN URL, corrupting
the presigned query string into a 403. The bearer token is dropped on
cross-host (CDN) redirects.

tests/test-hf-resolve.sh gains an offline fall-back case (HF_HUB_OFFLINE=1),
a WHISPER_CLI override, and an optional no-OpenSSL rebuild-hint check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 16:20:52 -04:00
Dominic Dones f8500a9a12 examples: add HF cache model resolution to whisper-cli (-hf/-hff)
Port llama.cpp's HuggingFace hub-cache subsystem (http.h, hf-cache.{h,cpp})
into whisper.cpp's shared common library and wire -hf/--hf-repo +
-hff/--hf-file into whisper-cli. Phase 1 is cache-only: whisper_hf_resolve_model
scans the on-disk HF hub cache (get_cached_files + finalize_file) and maps
org/repo (+ optional file) to a concrete snapshot path, so a model already
pulled by the hf CLI resolves with no -m path. An explicit -m still wins and
the no-args default stays models/ggml-base.en.bin.

The network download path is compiled but unused this phase (enabled in
Phase 2). Adds tests/test-hf-resolve.sh covering cache hit, missing-file
error (exit 3), -m regression, and the default path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:52:48 -04: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 Bevenius 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
texasich 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
petterreinholdtsen 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
Georgi Gerganov 84f8db71d8 talk-llama : sync llama.cpp 2026-02-27 20:57:58 +02:00
Dmitry Atamanov cec1dd9d12
examples : update miniaudio library to 0.11.24 (#3672) 2026-02-27 11:15:15 +01:00
Georgi Gerganov 364c77f4ca talk-llama : sync llama.cpp 2026-02-15 21:44:37 +02:00
Sid Mohan eb27fa2252
server : fix hardcoded /inference path in default HTML page (#3639)
Closes #3596
2026-02-09 10:10:13 +02:00
Georgi Gerganov 4b23ff249e talk-llama : sync llama.cpp 2026-02-08 09:29:10 +02:00
Georgi Gerganov 953e503fd9 talk-llama : sync llama.cpp 2026-01-30 15:56:40 +02:00