From 4585bb82420c97ec0b5a39f7d94fd2bc0fd73138 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 11 Nov 2024 01:28:42 +0200 Subject: [PATCH 01/14] update whisper.cpp --- .gitmodules | 2 +- sys/whisper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0863136..1561ba4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "sys/whisper.cpp"] path = sys/whisper.cpp - url = https://github.com/ggerganov/whisper.cpp + url = https://github.com/thewh1teagle/whisper.cpp diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 0377596..4cb3f81 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 0377596b77a3602e36430320cbe45f8c305ef04a +Subproject commit 4cb3f81b377f38149678351b9326d83152904bfb From 828ac50ca031442252be7d90216cd12bd1387c65 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:10:42 +0200 Subject: [PATCH 02/14] Update whisper.cpp --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 4cb3f81..ca99645 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 4cb3f81b377f38149678351b9326d83152904bfb +Subproject commit ca99645e20f45a7904771192122fc79a9871a109 From fab85025be2fc90c7fbf03aad80cb0747160de09 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:25:22 +0200 Subject: [PATCH 03/14] update whisper.cpp to 7fd8d9 --- src/standalone.rs | 4 ---- sys/whisper.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/standalone.rs b/src/standalone.rs index 7319126..2b0d439 100644 --- a/src/standalone.rs +++ b/src/standalone.rs @@ -105,8 +105,6 @@ pub struct SystemInfo { pub avx2: bool, pub fma: bool, pub f16c: bool, - pub blas: bool, - pub cuda: bool, } impl Default for SystemInfo { @@ -117,8 +115,6 @@ impl Default for SystemInfo { avx2: whisper_rs_sys::ggml_cpu_has_avx2() != 0, fma: whisper_rs_sys::ggml_cpu_has_fma() != 0, f16c: whisper_rs_sys::ggml_cpu_has_f16c() != 0, - blas: whisper_rs_sys::ggml_cpu_has_blas() != 0, - cuda: whisper_rs_sys::ggml_cpu_has_cuda() != 0, } } } diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 0377596..8c6a9b8 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 0377596b77a3602e36430320cbe45f8c305ef04a +Subproject commit 8c6a9b8bb6a0273cc0b5915903ca1ff9206c6285 From 6b4cd34f0db5a3b9c562d351cbe205f33fe4980d Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:30:13 +0200 Subject: [PATCH 04/14] update whisper.cpp --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 8c6a9b8..ca99645 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 8c6a9b8bb6a0273cc0b5915903ca1ff9206c6285 +Subproject commit ca99645e20f45a7904771192122fc79a9871a109 From 783a7858dbf14cc8d7af454190089f3ff6ad378b Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:46:08 +0200 Subject: [PATCH 05/14] fix: link ggml --- sys/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/build.rs b/sys/build.rs index ef72d84..b69f211 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -253,6 +253,9 @@ fn main() { println!("cargo:rustc-link-search=native={}", destination.display()); println!("cargo:rustc-link-lib=static=whisper"); println!("cargo:rustc-link-lib=static=ggml"); + println!("cargo:rustc-link-lib=static=ggml-base"); + println!("cargo:rustc-link-lib=static=ggml-cpu"); + println!("cargo:rustc-link-lib=static=ggml-blas"); println!( "cargo:WHISPER_CPP_VERSION={}", From 029c1c424b4686219d3de56ec35467f218603ba8 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:53:39 +0200 Subject: [PATCH 06/14] fix: link metal --- sys/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/build.rs b/sys/build.rs index b69f211..a45cb74 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -257,6 +257,10 @@ fn main() { println!("cargo:rustc-link-lib=static=ggml-cpu"); println!("cargo:rustc-link-lib=static=ggml-blas"); + if cfg!(feature = "metal") { + println!("cargo:rustc-link-lib=static=ggml-metal"); + } + println!( "cargo:WHISPER_CPP_VERSION={}", get_whisper_cpp_version(&whisper_root) From ea9d6bc8bbd47c1e093e7e38164a6029d763f95b Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 19:40:26 +0200 Subject: [PATCH 07/14] fix vulkan link --- sys/build.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/build.rs b/sys/build.rs index a45cb74..01f5b6d 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -255,7 +255,13 @@ fn main() { println!("cargo:rustc-link-lib=static=ggml"); println!("cargo:rustc-link-lib=static=ggml-base"); println!("cargo:rustc-link-lib=static=ggml-cpu"); - println!("cargo:rustc-link-lib=static=ggml-blas"); + if cfg!(target_os = "macos") { + println!("cargo:rustc-link-lib=static=ggml-blas"); + } + if cfg!(feature = "vulkan") { + println!("cargo:rustc-link-lib=static=ggml-vulkan"); + } + if cfg!(feature = "metal") { println!("cargo:rustc-link-lib=static=ggml-metal"); From f8a886144f331b32a9838b3bd0a1a7f3ed9e28e5 Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Tue, 28 Jan 2025 15:06:27 +0100 Subject: [PATCH 08/14] Update submodule URL for whisper.cpp --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 1561ba4..0863136 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "sys/whisper.cpp"] path = sys/whisper.cpp - url = https://github.com/thewh1teagle/whisper.cpp + url = https://github.com/ggerganov/whisper.cpp From 90058a9068b49d4a34c8acba3892b4ae1189cfd6 Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Tue, 28 Jan 2025 15:16:46 +0100 Subject: [PATCH 09/14] Update submodule commit for whisper.cpp --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index ca99645..8c6a9b8 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit ca99645e20f45a7904771192122fc79a9871a109 +Subproject commit 8c6a9b8bb6a0273cc0b5915903ca1ff9206c6285 From 251a9e3c1d3b0101c69a89c80bef605ae995cb56 Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Tue, 28 Jan 2025 15:17:34 +0100 Subject: [PATCH 10/14] Remove unnecessary blank line in build.rs --- sys/build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/build.rs b/sys/build.rs index 01f5b6d..8181d24 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -261,7 +261,6 @@ fn main() { if cfg!(feature = "vulkan") { println!("cargo:rustc-link-lib=static=ggml-vulkan"); } - if cfg!(feature = "metal") { println!("cargo:rustc-link-lib=static=ggml-metal"); From 39cf1f4d4059acb86360ed53d423c751c02e214e Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Tue, 28 Jan 2025 15:23:59 +0100 Subject: [PATCH 11/14] Remove deprecated method for suppressing non-speech tokens in FullParams --- src/whisper_params.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/whisper_params.rs b/src/whisper_params.rs index d412bf1..34b4adc 100644 --- a/src/whisper_params.rs +++ b/src/whisper_params.rs @@ -299,15 +299,6 @@ impl<'a, 'b> FullParams<'a, 'b> { self.fp.suppress_blank = suppress_blank; } - /// Set suppress_non_speech_tokens. - /// See - /// for more information. - /// - /// Defaults to false. - pub fn set_suppress_non_speech_tokens(&mut self, suppress_non_speech_tokens: bool) { - self.fp.suppress_non_speech_tokens = suppress_non_speech_tokens; - } - /// Set initial decoding temperature. /// See for more information. /// From f9fe2acf952226b5abdd78af409f17683c13b506 Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Tue, 28 Jan 2025 15:24:04 +0100 Subject: [PATCH 12/14] Update submodule commit for whisper.cpp --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 8c6a9b8..7ffcd05 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 8c6a9b8bb6a0273cc0b5915903ca1ff9206c6285 +Subproject commit 7ffcd05267b7ff47a271961c5eec11d1a15effe8 From b752731e8344d9ecfa5923da024f448d6a7c12da Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Thu, 13 Feb 2025 18:04:52 +0100 Subject: [PATCH 13/14] Re-add suppress_nst function with shorter fn name --- src/whisper_params.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/whisper_params.rs b/src/whisper_params.rs index 34b4adc..36a709e 100644 --- a/src/whisper_params.rs +++ b/src/whisper_params.rs @@ -299,6 +299,15 @@ impl<'a, 'b> FullParams<'a, 'b> { self.fp.suppress_blank = suppress_blank; } + /// Set suppress_non_speech_tokens. + /// See + /// for more information. + /// + /// Defaults to false. + pub fn set_suppress_nst(&mut self, suppress_nst: bool) { + self.fp.suppress_nst = suppress_nst; + } + /// Set initial decoding temperature. /// See for more information. /// From aaaa1ed36198f3ec61df9d5e2271c8420bcb921e Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Thu, 13 Feb 2025 18:09:09 +0100 Subject: [PATCH 14/14] Pin whisper.cpp to v1.7.4 --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 7ffcd05..8a9ad78 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 7ffcd05267b7ff47a271961c5eec11d1a15effe8 +Subproject commit 8a9ad7844d6e2a10cddf4b92de4089d7ac2b14a9