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/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/build.rs b/sys/build.rs index ef72d84..01f5b6d 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -253,6 +253,19 @@ 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"); + 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"); + } println!( "cargo:WHISPER_CPP_VERSION={}", diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 0377596..ca99645 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 0377596b77a3602e36430320cbe45f8c305ef04a +Subproject commit ca99645e20f45a7904771192122fc79a9871a109