A free, open source, and extensible speech-to-text application that works completely offline.
feat: add GigaAM v3 for Russian speech recognition (#913)
pantafiveff8612297b00
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lockindex f5821f3a..219e0dd7 100644--- a/src-tauri/Cargo.lock+++ b/src-tauri/Cargo.lock@@ -14,6 +14,16 @@ version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"+[[package]]+name = "advapi32-sys"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a"+dependencies = [+ "winapi 0.2.8",+ "winapi-build",+]+[[package]]name = "ahash"version = "0.7.8"@@ -1392,7 +1402,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"dependencies = ["libc","redox_users 0.4.6",- "winapi",+ "winapi 0.3.9",][[package]]@@ -1454,7 +1464,7 @@ dependencies = ["dlopen2_derive","libc","once_cell",- "winapi",+ "winapi 0.3.9",][[package]]@@ -2249,7 +2259,7 @@ dependencies = ["gobject-sys","libc","system-deps 6.2.2",- "winapi",+ "winapi 0.3.9",][[package]]@@ -3189,7 +3199,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"dependencies = ["cfg-if",- "winapi",+ "winapi 0.3.9",][[package]]@@ -4853,7 +4863,7 @@ dependencies = ["strum","strum_macros","widestring",- "winapi",+ "winapi 0.3.9","x11",]@@ -4872,7 +4882,7 @@ dependencies = ["inotify 0.8.3","lazy_static","libc",- "winapi",+ "winapi 0.3.9","x11",]@@ -5757,7 +5767,7 @@ checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"dependencies = ["byteorder","libc",- "winapi",+ "winapi 0.3.9",][[package]]@@ -7143,10 +7153,11 @@ dependencies = [[[package]]name = "transcribe-rs"-version = "0.2.5"+version = "0.2.7"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "23e3bf6e1dd4909268796bdf3794fb6fda70f4a0e5a80e2e56cd3fc213a11586"+checksum = "25ad0a55f1482ec523073073a3a08a457c57dd956d09d62cdfe05a27a5591334"dependencies = [+ "advapi32-sys","base64 0.22.1","derive_builder","env_logger",@@ -7232,7 +7243,7 @@ checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"dependencies = ["memoffset","tempfile",- "winapi",+ "winapi 0.3.9",][[package]]@@ -7882,6 +7893,12 @@ version = "1.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471"+[[package]]+name = "winapi"+version = "0.2.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"+[[package]]name = "winapi"version = "0.3.9"@@ -7892,6 +7909,12 @@ dependencies = ["winapi-x86_64-pc-windows-gnu",]+[[package]]+name = "winapi-build"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"+[[package]]name = "winapi-i686-pc-windows-gnu"version = "0.4.0"@@ -8497,7 +8520,7 @@ version = "0.10.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"dependencies = [- "winapi",+ "winapi 0.3.9",][[package]]diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.tomlindex 0e215a72..b0aa4c74 100644--- a/src-tauri/Cargo.toml+++ b/src-tauri/Cargo.toml@@ -68,7 +68,7 @@ chrono = "0.4"rusqlite = { version = "0.37", features = ["bundled"] }tar = "0.4.44"flate2 = "1.0"-transcribe-rs = { version = "0.2.5", features = ["whisper", "parakeet", "moonshine", "sense_voice"] }+transcribe-rs = { version = "0.2.7", features = ["whisper", "parakeet", "moonshine", "sense_voice", "gigaam"] }handy-keys = "0.2.1"ferrous-opencc = "0.2.3"clap = { version = "4", features = ["derive"] }diff --git a/src-tauri/src/managers/model.rs b/src-tauri/src/managers/model.rsindex 9a211d95..50b2c04d 100644--- a/src-tauri/src/managers/model.rs+++ b/src-tauri/src/managers/model.rs@@ -23,6 +23,7 @@ pub enum EngineType {Moonshine,MoonshineStreaming,SenseVoice,+ GigaAM,}#[derive(Debug, Clone, Serialize, Deserialize, Type)]@@ -397,6 +398,32 @@ impl ModelManager {},);+ // GigaAM v3 supported languages+ let gigaam_languages: Vec<String> = vec!["ru"].into_iter().map(String::from).collect();++ available_models.insert(+ "gigaam-v3-e2e-ctc".to_string(),+ ModelInfo {+ id: "gigaam-v3-e2e-ctc".to_string(),+ name: "GigaAM v3".to_string(),+ description: "Russian speech recognition. Fast and accurate.".to_string(),+ filename: "giga-am-v3.int8.onnx".to_string(),+ url: Some("https://blob.handy.computer/giga-am-v3.int8.onnx".to_string()),+ size_mb: 225,+ is_downloaded: false,+ is_downloading: false,+ partial_size: 0,+ is_directory: false,+ engine_type: EngineType::GigaAM,+ accuracy_score: 0.85,+ speed_score: 0.75,+ supports_translation: false,+ is_recommended: false,+ supported_languages: gigaam_languages,+ is_custom: false,+ },+ );+// Auto-discover custom Whisper models (.bin files) in the models directoryif let Err(e) = Self::discover_custom_whisper_models(&models_dir, &mut available_models) {warn!("Failed to discover custom models: {}", e);diff --git a/src-tauri/src/managers/transcription.rs b/src-tauri/src/managers/transcription.rsindex e1b514e5..e9a3311c 100644--- a/src-tauri/src/managers/transcription.rs+++ b/src-tauri/src/managers/transcription.rs@@ -12,6 +12,7 @@ use std::time::{Duration, SystemTime};use tauri::{AppHandle, Emitter};use transcribe_rs::{engines::{+ gigaam::GigaAMEngine,moonshine::{ModelVariant, MoonshineEngine, MoonshineModelParams, MoonshineStreamingEngine,StreamingModelParams,@@ -42,6 +43,7 @@ enum LoadedEngine {Moonshine(MoonshineEngine),MoonshineStreaming(MoonshineStreamingEngine),SenseVoice(SenseVoiceEngine),+ GigaAM(GigaAMEngine),}#[derive(Clone)]@@ -165,6 +167,7 @@ impl TranscriptionManager {LoadedEngine::Moonshine(ref mut e) => e.unload_model(),LoadedEngine::MoonshineStreaming(ref mut e) => e.unload_model(),LoadedEngine::SenseVoice(ref mut e) => e.unload_model(),+ LoadedEngine::GigaAM(ref mut e) => e.unload_model(),}}*engine = None; // Drop the engine to free memory@@ -346,6 +349,23 @@ impl TranscriptionManager {})?;LoadedEngine::SenseVoice(engine)}+ EngineType::GigaAM => {+ let mut engine = GigaAMEngine::new();+ engine.load_model(&model_path).map_err(|e| {+ let error_msg = format!("Failed to load gigaam model {}: {}", model_id, e);+ let _ = self.app_handle.emit(+ "model-state-changed",+ ModelStateEvent {+ event_type: "loading_failed".to_string(),+ model_id: Some(model_id.to_string()),+ model_name: Some(model_info.name.clone()),+ error: Some(error_msg.clone()),+ },+ );+ anyhow::anyhow!(error_msg)+ })?;+ LoadedEngine::GigaAM(engine)+ }};// Update the current engine and model ID@@ -526,6 +546,9 @@ impl TranscriptionManager {anyhow::anyhow!("SenseVoice transcription failed: {}", e)})}+ LoadedEngine::GigaAM(gigaam_engine) => gigaam_engine+ .transcribe_samples(audio, None)+ .map_err(|e| anyhow::anyhow!("GigaAM transcription failed: {}", e)),}},));diff --git a/src/bindings.ts b/src/bindings.tsindex 9a7e30fd..0a9edce2 100644--- a/src/bindings.ts+++ b/src/bindings.ts@@ -744,7 +744,7 @@ export type AutoSubmitKey = "enter" | "ctrl_enter" | "cmd_enter"export type BindingResponse = { success: boolean; binding: ShortcutBinding | null; error: string | null }export type ClipboardHandling = "dont_modify" | "copy_to_clipboard"export type CustomSounds = { start: boolean; stop: boolean }-export type EngineType = "Whisper" | "Parakeet" | "Moonshine" | "MoonshineStreaming" | "SenseVoice"+export type EngineType = "Whisper" | "Parakeet" | "Moonshine" | "MoonshineStreaming" | "SenseVoice" | "GigaAM"export type HistoryEntry = { id: number; file_name: string; timestamp: number; saved: boolean; title: string; transcription_text: string; post_processed_text: string | null; post_process_prompt: string | null }/*** Result of changing keyboard implementationdiff --git a/src/i18n/locales/ar/translation.json b/src/i18n/locales/ar/translation.jsonindex 5202c199..103c8b78 100644--- a/src/i18n/locales/ar/translation.json+++ b/src/i18n/locales/ar/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "سريع جداً. الصينية، الإنجليزية، اليابانية، الكورية، الكانتونية."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "التعرف على الكلام الروسي. سريع ودقيق."}},"errors": {diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.jsonindex 548538ea..bfdc33e0 100644--- a/src/i18n/locales/cs/translation.json+++ b/src/i18n/locales/cs/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Velmi rychlý. Čínština, angličtina, japonština, korejština, kantonština."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Rozpoznávání ruské řeči. Rychlé a přesné."}},"errors": {diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.jsonindex 5fc8227e..2b5e6c36 100644--- a/src/i18n/locales/de/translation.json+++ b/src/i18n/locales/de/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Sehr schnell. Chinesisch, Englisch, Japanisch, Koreanisch, Kantonesisch."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Russische Spracherkennung. Schnell und präzise."}},"errors": {diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.jsonindex e3bdde15..eb0fa60b 100644--- a/src/i18n/locales/en/translation.json+++ b/src/i18n/locales/en/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Very fast. Chinese, English, Japanese, Korean, Cantonese."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Russian speech recognition. Fast and accurate."}},"errors": {diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.jsonindex 135b044a..d917da9b 100644--- a/src/i18n/locales/es/translation.json+++ b/src/i18n/locales/es/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Muy rápido. Chino, inglés, japonés, coreano, cantonés."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Reconocimiento de voz en ruso. Rápido y preciso."}},"errors": {diff --git a/src/i18n/locales/fr/translation.json b/src/i18n/locales/fr/translation.jsonindex 5eab7c64..ed333f41 100644--- a/src/i18n/locales/fr/translation.json+++ b/src/i18n/locales/fr/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Très rapide. Chinois, anglais, japonais, coréen, cantonais."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Reconnaissance vocale en russe. Rapide et précis."}},"errors": {diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.jsonindex eeb80e8d..b62c41e9 100644--- a/src/i18n/locales/it/translation.json+++ b/src/i18n/locales/it/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Molto veloce. Cinese, inglese, giapponese, coreano, cantonese."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Riconoscimento vocale in russo. Veloce e preciso."}},"errors": {diff --git a/src/i18n/locales/ja/translation.json b/src/i18n/locales/ja/translation.jsonindex 56eeb404..f5700af0 100644--- a/src/i18n/locales/ja/translation.json+++ b/src/i18n/locales/ja/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "非常に高速。中国語、英語、日本語、韓国語、広東語。"+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "ロシア語音声認識。高速かつ高精度。"}},"errors": {diff --git a/src/i18n/locales/ko/translation.json b/src/i18n/locales/ko/translation.jsonindex 70950a49..dbd05872 100644--- a/src/i18n/locales/ko/translation.json+++ b/src/i18n/locales/ko/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "매우 빠름. 중국어, 영어, 일본어, 한국어, 광둥어."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "러시아어 음성 인식. 빠르고 정확함."}},"errors": {diff --git a/src/i18n/locales/pl/translation.json b/src/i18n/locales/pl/translation.jsonindex 584206c3..df99c497 100644--- a/src/i18n/locales/pl/translation.json+++ b/src/i18n/locales/pl/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Bardzo szybki. Chiński, angielski, japoński, koreański, kantoński."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Rozpoznawanie mowy rosyjskiej. Szybkie i dokładne."}},"errors": {diff --git a/src/i18n/locales/pt/translation.json b/src/i18n/locales/pt/translation.jsonindex 2dbea86e..571a66d3 100644--- a/src/i18n/locales/pt/translation.json+++ b/src/i18n/locales/pt/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Muito rápido. Chinês, inglês, japonês, coreano, cantonês."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Reconhecimento de voz em russo. Rápido e preciso."}},"errors": {diff --git a/src/i18n/locales/ru/translation.json b/src/i18n/locales/ru/translation.jsonindex e45d97c9..a3f95449 100644--- a/src/i18n/locales/ru/translation.json+++ b/src/i18n/locales/ru/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Очень быстрый. Китайский, английский, японский, корейский, кантонский."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Распознавание русской речи. Быстро и точно."}},"errors": {diff --git a/src/i18n/locales/tr/translation.json b/src/i18n/locales/tr/translation.jsonindex 7fc47675..89daab47 100644--- a/src/i18n/locales/tr/translation.json+++ b/src/i18n/locales/tr/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Çok hızlı. Çince, İngilizce, Japonca, Korece, Kantonca."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Rusça konuşma tanıma. Hızlı ve doğru."}},"errors": {diff --git a/src/i18n/locales/uk/translation.json b/src/i18n/locales/uk/translation.jsonindex 6643ed8b..9c9b2c3d 100644--- a/src/i18n/locales/uk/translation.json+++ b/src/i18n/locales/uk/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Дуже швидкий. Китайська, англійська, японська, корейська, кантонська."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Розпізнавання російського мовлення. Швидко і точно."}},"errors": {diff --git a/src/i18n/locales/vi/translation.json b/src/i18n/locales/vi/translation.jsonindex f4c55efd..e8e1beda 100644--- a/src/i18n/locales/vi/translation.json+++ b/src/i18n/locales/vi/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "Rất nhanh. Tiếng Trung, tiếng Anh, tiếng Nhật, tiếng Hàn, tiếng Quảng Đông."+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "Nhận dạng giọng nói tiếng Nga. Nhanh và chính xác."}},"errors": {diff --git a/src/i18n/locales/zh-TW/translation.json b/src/i18n/locales/zh-TW/translation.jsonindex 1197792c..92e0704b 100644--- a/src/i18n/locales/zh-TW/translation.json+++ b/src/i18n/locales/zh-TW/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "速度極快。支援中文、英語、日語、韓語、粵語。"+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "俄語語音辨識。快速且準確。"}},"errors": {diff --git a/src/i18n/locales/zh/translation.json b/src/i18n/locales/zh/translation.jsonindex 3b0a676b..ac389e2b 100644--- a/src/i18n/locales/zh/translation.json+++ b/src/i18n/locales/zh/translation.json@@ -75,6 +75,10 @@"sense-voice-int8": {"name": "SenseVoice","description": "非常快速。支持中文、英语、日语、韩语、粤语。"+ },+ "gigaam-v3-e2e-ctc": {+ "name": "GigaAM v3",+ "description": "俄语语音识别。快速且准确。"}},"errors": {