Skip to content

Commit fd5f709

Browse files
authored
Merge pull request #83 from cjpais/upgrade-whisper
Upgrade whisper-rs
2 parents ebb1589 + 8bbcfc6 commit fd5f709

File tree

3 files changed

+16
-52
lines changed

3 files changed

+16
-52
lines changed

src-tauri/Cargo.lock

Lines changed: 10 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ tauri-plugin-clipboard-manager = "2"
4040
tauri-plugin-macos-permissions = "2.0.4"
4141
rdev = { git = "https://github.com/rustdesk-org/rdev" }
4242
cpal = "0.16.0"
43-
whisper-rs = { version = "0.13.2", features = ["whisper-cpp-log"] }
4443
anyhow = "1.0.95"
4544
rubato = "0.16.2"
4645
hound = "3.5.1"
@@ -64,13 +63,13 @@ natural = "0.5.0"
6463
version = "=2.0.0-rc.9"
6564

6665
[target.'cfg(target_os = "macos")'.dependencies]
67-
whisper-rs = { version = "0.13.2", features = ["metal"] }
66+
whisper-rs = { version = "0.14.4", features = ["metal", "log_backend"] }
6867

6968
[target.'cfg(target_os = "windows")'.dependencies]
70-
whisper-rs = { version = "0.13.2", features = ["vulkan"] }
69+
whisper-rs = { version = "0.14.4", features = ["vulkan", "log_backend"] }
7170

7271
[target.'cfg(target_os = "linux")'.dependencies]
73-
whisper-rs = { version = "0.13.2", features = ["vulkan"] }
72+
whisper-rs = { version = "0.14.4", features = ["vulkan", "log_backend"] }
7473

7574
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
7675
tauri-plugin-autostart = "2"

src-tauri/src/managers/transcription.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use serde::Serialize;
66
use std::sync::{Arc, Mutex};
77
use strsim::levenshtein;
88
use tauri::{App, AppHandle, Emitter, Manager};
9-
use whisper_rs::install_whisper_log_trampoline;
9+
use whisper_rs::install_logging_hooks;
1010
use whisper_rs::{
1111
FullParams, SamplingStrategy, WhisperContext, WhisperContextParameters, WhisperState,
1212
};
@@ -197,7 +197,7 @@ impl TranscriptionManager {
197197
);
198198

199199
// Install log trampoline once per model load (safe to call multiple times)
200-
install_whisper_log_trampoline();
200+
install_logging_hooks();
201201

202202
// Create new context
203203
let context =
@@ -295,8 +295,8 @@ impl TranscriptionManager {
295295
params.set_print_realtime(false);
296296
params.set_print_timestamps(false);
297297
params.set_suppress_blank(true);
298+
params.set_suppress_nst(true);
298299
params.set_no_speech_thold(0.2);
299-
params.set_suppress_non_speech_tokens(true);
300300

301301
// Enable translation to English if requested
302302
if settings.translate_to_english {

0 commit comments

Comments
 (0)