From 03289f84d7b48ae3888e8ec3411748060bd03146 Mon Sep 17 00:00:00 2001 From: segudev <41948994+segudev@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:57:47 +0200 Subject: [PATCH] fix: restore translate-to-english functionality (#173) * fix: restore translate-to-english functionality The translate option broke when migrating from whisper-rs to transcribe-rs. This fix patches transcribe-rs to add translate parameter support and passes the translate_to_english setting to the Whisper engine. Additionally fixed AccessibilityPermissions API calls to match updated library. Translation only works with Whisper multilingual models (not .en models). Parakeet models don't support translation as they are transcription-only. Fixes #152 * bump transcribe rs --------- Co-authored-by: CJ Pais --- src-tauri/Cargo.lock | 4 ++-- src-tauri/Cargo.toml | 2 +- src-tauri/src/managers/transcription.rs | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 62b95b5..860153b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -6684,9 +6684,9 @@ dependencies = [ [[package]] name = "transcribe-rs" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaeba5648789d05eedce5478069195639a0770dcc0338146037d4b85163df4bd" +checksum = "b5a2e67ea475c444fee6ffa137eb180c484a87bd3755034e08bc95273f1da0d6" dependencies = [ "env_logger 0.10.2", "hound", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6f3b228..9ef7c0f 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -64,7 +64,7 @@ rusqlite = { version = "0.32", features = ["bundled"] } tauri-plugin-sql = { version = "2", features = ["sqlite"] } tar = "0.4.44" flate2 = "1.0" -transcribe-rs = "0.1.0" +transcribe-rs = "0.1.1" [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 b91a487..f71bca8 100644 --- a/src-tauri/src/managers/transcription.rs +++ b/src-tauri/src/managers/transcription.rs @@ -347,6 +347,7 @@ impl TranscriptionManager { } else { Some(settings.selected_language.clone()) }, + translate: settings.translate_to_english, ..Default::default() };