diff --git a/AGENTS.md b/AGENTS.md index 2e16def..8059be2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,7 +23,7 @@ users never build Rust. - Credo enables `Readability.Specs`, so a public function without a `@spec` fails. `Readability.ModuleDoc` is off, but every public module still gets a `@moduledoc`; no check catches a missing one. - `whisper-rs` and `whisper-rs-sys` come from a `[patch.crates-io]` pin to the `vendor/whisper-rs-0.16.0-patched` - branch of this repo. It adds the callback and CString-leak fixes and moves whisper.cpp to v1.9.4. On a `whisper-rs` + branch of this repo. It adds the callback and CString-leak fixes and moves whisper.cpp to v1.9.5. On a `whisper-rs` version bump, check the patch again (issue #26). - `WHISPER_CPP_FEATURES` picks the cargo feature, and `WHISPER_CPP_BUILD=1` forces a source build. A change to either, or to `WHISPER_CPP_VARIANT`, recompiles the NIF wrapper. The `build:*` tasks set them only for their own run, so a diff --git a/CHANGELOG.md b/CHANGELOG.md index b2cb4d7..ccfb147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm the old NIF file again before it extracts the new one. Version 0.9.0 wrote over the file in place, which can crash a process that has the NIF loaded. +- Vendored whisper.cpp 1.9.4 -> 1.9.5, with ggml 0.26.0, through the same + vendor branch of this repo. whisper-rs stays at the patched 0.16.0 + (issue #26). On Apple Silicon, whisper.cpp 1.9.5 runs the encoder through + ANEForge when the environment sets `ANEFORGE_ENCODER`; without it, + nothing changes. - The precompiled NIFs are built with Rust 1.99.1 (was 1.98.1), and the `hipblas` variant with ROCm 7.2.4 (was 7.2.3). CI uses Elixir 1.20.5 and OTP 29.1.2. Source builds still need Rust 1.98 or later. @@ -18,6 +23,12 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm 0.4.35 are build only. `mix.lock` has rustler_precompiled 0.10.1. ### Fixed +- An `:abort_handle` now also stops the language auto-detection, which + runs before the transcription (ggml-org/whisper.cpp#4077). Before, an + abort waited for the detection pass to finish. +- `load_model/2` rejects a model file with an invalid tensor type, and a + `:vad_model_path` with an encoder layer count other than 4, instead of + reading out of bounds (ggml-org/whisper.cpp#4091, ggml-org/whisper.cpp#4064). - `transcribe/3` with `:offset_ms` or `:duration_ms` and no `:vad_model_path` detects the language on the window. Before, whisper.cpp detected it on the first 30 s of the whole buffer, so the window could diff --git a/native/whisper_cpp_native/Cargo.lock b/native/whisper_cpp_native/Cargo.lock index b9e02c8..c167dee 100644 --- a/native/whisper_cpp_native/Cargo.lock +++ b/native/whisper_cpp_native/Cargo.lock @@ -381,7 +381,7 @@ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] name = "whisper-rs" version = "0.16.0" -source = "git+https://github.com/rubas/whisper_cpp.git?rev=9a4232f1e2f1fc93987746cb080c074229673fc7#9a4232f1e2f1fc93987746cb080c074229673fc7" +source = "git+https://github.com/rubas/whisper_cpp.git?rev=1f3c84e887d9811463ba8fed6459d21a19e000a3#1f3c84e887d9811463ba8fed6459d21a19e000a3" dependencies = [ "libc", "whisper-rs-sys", @@ -390,7 +390,7 @@ dependencies = [ [[package]] name = "whisper-rs-sys" version = "0.15.0" -source = "git+https://github.com/rubas/whisper_cpp.git?rev=9a4232f1e2f1fc93987746cb080c074229673fc7#9a4232f1e2f1fc93987746cb080c074229673fc7" +source = "git+https://github.com/rubas/whisper_cpp.git?rev=1f3c84e887d9811463ba8fed6459d21a19e000a3#1f3c84e887d9811463ba8fed6459d21a19e000a3" dependencies = [ "bindgen", "cfg-if", diff --git a/native/whisper_cpp_native/Cargo.toml b/native/whisper_cpp_native/Cargo.toml index f0d5286..974425c 100644 --- a/native/whisper_cpp_native/Cargo.toml +++ b/native/whisper_cpp_native/Cargo.toml @@ -61,11 +61,11 @@ opt-level = 2 # (codeberg.org/tazz4843/whisper-rs issues 277/271, fix PR 278) and # vendors whisper.cpp 1.8.3. The `vendor/whisper-rs-0.16.0-patched` # branch of this repo carries the published 0.16.0 with the callback -# and CString-leak fixes plus the whisper.cpp submodule at v1.9.4. Drop +# and CString-leak fixes plus the whisper.cpp submodule at v1.9.5. Drop # both patches once a whisper-rs release lands the fixes and re-vendors # (issue #26). Known upstream design holes left untouched (unreachable # from this crate, which never clones FullParams): cloning a FullParams # shares the installed closures and grammar pointers across clones. [patch.crates-io] -whisper-rs = { git = "https://github.com/rubas/whisper_cpp.git", rev = "9a4232f1e2f1fc93987746cb080c074229673fc7" } -whisper-rs-sys = { git = "https://github.com/rubas/whisper_cpp.git", rev = "9a4232f1e2f1fc93987746cb080c074229673fc7" } +whisper-rs = { git = "https://github.com/rubas/whisper_cpp.git", rev = "1f3c84e887d9811463ba8fed6459d21a19e000a3" } +whisper-rs-sys = { git = "https://github.com/rubas/whisper_cpp.git", rev = "1f3c84e887d9811463ba8fed6459d21a19e000a3" }