diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 623542b..008d8d2 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -374,22 +374,25 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" -version = "0.71.1" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "bitflags 2.8.0", "cexpr", "clang-sys", "itertools", + "lazy_static", + "lazycell", "log", "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.96", + "which", ] [[package]] @@ -2063,6 +2066,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "hound" version = "3.5.1" @@ -2654,6 +2666,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libappindicator" version = "0.9.0" @@ -3990,7 +4008,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", + "rustc-hash 2.1.0", "rustls", "socket2", "thiserror 2.0.11", @@ -4008,7 +4026,7 @@ dependencies = [ "getrandom 0.2.15", "rand 0.8.5", "ring", - "rustc-hash", + "rustc-hash 2.1.0", "rustls", "rustls-pki-types", "slab", @@ -4374,6 +4392,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.0" @@ -6490,21 +6514,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] -name = "whisper-rs" -version = "0.14.4" +name = "which" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2eac0a371f8ae667a5ee15ae4130553ea3004e7572544d1ce546c81ea8874b" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "whisper-rs" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b6fc553156b521663bfa8e713e7ad58c7ca262d46de9998cd7f2e4de5ba0d9" dependencies = [ - "libc", - "log", "whisper-rs-sys", ] [[package]] name = "whisper-rs-sys" -version = "0.13.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c86f1b993f216594b1ad9a9bb00a26014fb7c512e12664a2d401c7897d2ef7d" +checksum = "76bab42b2c319e3a1e0280137c59368072348d3277873c7588b6466a127dca58" dependencies = [ "bindgen", "cfg-if", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index bd4678a..4f6290d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -63,13 +63,13 @@ natural = "0.5.0" version = "=2.0.0-rc.9" [target.'cfg(target_os = "macos")'.dependencies] -whisper-rs = { version = "0.14.4", features = ["metal", "log_backend"] } +whisper-rs = { version = "0.13.2", features = ["metal"] } [target.'cfg(target_os = "windows")'.dependencies] -whisper-rs = { version = "0.14.4", features = ["vulkan", "log_backend"] } +whisper-rs = { version = "0.13.2", features = ["vulkan"] } [target.'cfg(target_os = "linux")'.dependencies] -whisper-rs = { version = "0.14.4", features = ["vulkan", "log_backend"] } +whisper-rs = { version = "0.13.2", features = ["vulkan"] } [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] tauri-plugin-autostart = "2" diff --git a/src-tauri/src/managers/transcription.rs b/src-tauri/src/managers/transcription.rs index c71399d..7de0746 100644 --- a/src-tauri/src/managers/transcription.rs +++ b/src-tauri/src/managers/transcription.rs @@ -6,7 +6,6 @@ use serde::Serialize; use std::sync::{Arc, Mutex}; use strsim::levenshtein; use tauri::{App, AppHandle, Emitter, Manager}; -use whisper_rs::install_logging_hooks; use whisper_rs::{ FullParams, SamplingStrategy, WhisperContext, WhisperContextParameters, WhisperState, }; @@ -196,9 +195,6 @@ impl TranscriptionManager { model_id, path_str ); - // Install log trampoline once per model load (safe to call multiple times) - install_logging_hooks(); - // Create new context let context = WhisperContext::new_with_params(path_str, WhisperContextParameters::default()) @@ -295,7 +291,7 @@ impl TranscriptionManager { params.set_print_realtime(false); params.set_print_timestamps(false); params.set_suppress_blank(true); - params.set_suppress_nst(true); + params.set_suppress_non_speech_tokens(true); params.set_no_speech_thold(0.2); // Enable translation to English if requested