diff --git a/README.md b/README.md index 3dec991..e983447 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,14 @@ This are the neural networks we are currently using: - Text-To-Speech - [~~Silero TTS~~](https://github.com/snakers4/silero-models) *(currently not used)* - [~~Coqui TTS~~](https://github.com/coqui-ai/TTS) *(currently not used)* + - [~~WinRT~~] (https://github.com/ndarilek/tts-rs) *(currently not used)* + - [~gTTS~] (https://github.com/nightlyistaken/tts_rust) *(currently not used)* + - [~~SAM~~] (https://github.com/s-macke/SAM) *(currently not used)* - Wake Word - [Rustpotter](https://github.com/GiviMAD/rustpotter) *(Partially implemented, still WIP)* - [Picovoice Porcupine](https://github.com/Picovoice/porcupine) via [official SDK](https://github.com/Picovoice/porcupine#rust) *(requires API key)* - [Vosk Speech Recognition Toolkit](https://github.com/alphacep/vosk-api) via [Vosk-rs](https://github.com/Bear-03/vosk-rs) *(very slow)* + - [~~Snowboy~~] *(currently not used)* - NLU - Nothing yet. - Chat @@ -52,7 +56,7 @@ Or run dev with `cargo tauri dev`. Abraham Tugalov ## Python version? -Old version of Jarvis was build with Python.
+Old version of Jarvis was built with Python.
The last Python version commit can be found [here](https://github.com/Priler/jarvis/tree/943efbfbdb8aeb5889fa5e2dc7348ca4ea0b81df). ## License diff --git a/public/assets/media/images/decor.png b/public/assets/media/images/decor.png new file mode 100644 index 0000000..a292813 Binary files /dev/null and b/public/assets/media/images/decor.png differ diff --git a/src-tauri/commands/browser/ahk/Close browser.ahk b/src-tauri/commands/browser/ahk/Close browser.ahk new file mode 100644 index 0000000..2f19bdb --- /dev/null +++ b/src-tauri/commands/browser/ahk/Close browser.ahk @@ -0,0 +1,19 @@ +; Rerun as admin, if required +If Not A_IsAdmin +{ + Run *RunAs "%A_ScriptFullPath%" + ExitApp +} + +; set partial title matching mode +SetTitleMatchMode, 2 + +; list of all browsers to close +GroupAdd, browsers, ahk_class MozillaWindowClass +GroupAdd, browsers, ahk_class IEFrame +GroupAdd, browsers, ahk_exe msedge.exe +GroupAdd, browsers, ahk_exe chrome.exe +GroupAdd, browsers, ahk_exe firefox.exe + +; kill them all +Winclose, ahk_group browsers \ No newline at end of file diff --git a/src-tauri/commands/browser/ahk/Close browser.exe b/src-tauri/commands/browser/ahk/Close browser.exe new file mode 100644 index 0000000..d025684 Binary files /dev/null and b/src-tauri/commands/browser/ahk/Close browser.exe differ diff --git a/src-tauri/commands/browser/command.yaml b/src-tauri/commands/browser/command.yaml index 4272892..57f25ec 100644 --- a/src-tauri/commands/browser/command.yaml +++ b/src-tauri/commands/browser/command.yaml @@ -9,10 +9,24 @@ list: - ok3 phrases: - открой браузер - - запусти браузер - открой хром - гугл хром +- command: + action: ahk + exe_path: ahk/Close browser.exe + voice: + sounds: + - ok1 + - ok2 + - ok3 + - ok4 + phrases: + - закрой все браузеры + - закрой браузер + - выключи браузер + - убери браузер + - command: action: ahk exe_path: ahk/Run website.exe diff --git a/src-tauri/commands/calculator/command.yaml b/src-tauri/commands/calculator/command.yaml index 9eb8772..b295335 100644 --- a/src-tauri/commands/calculator/command.yaml +++ b/src-tauri/commands/calculator/command.yaml @@ -8,6 +8,7 @@ list: - ok2 - ok3 phrases: + - включи калькулятор - открой калькулятор - покажи калькулятор - запусти калькулятор diff --git a/src-tauri/commands/stop/command.yaml b/src-tauri/commands/stop/command.yaml index e52cf66..30a08dc 100644 --- a/src-tauri/commands/stop/command.yaml +++ b/src-tauri/commands/stop/command.yaml @@ -12,4 +12,6 @@ list: - не слушай - перестань слушать - отдыхай + - на этом всё + - хватит слушать - на этом всё \ No newline at end of file diff --git a/src-tauri/commands/volume/command.yaml b/src-tauri/commands/volume/command.yaml index 22a7e6f..840c481 100644 --- a/src-tauri/commands/volume/command.yaml +++ b/src-tauri/commands/volume/command.yaml @@ -2,7 +2,6 @@ list: - command: action: ahk exe_path: ahk/Mute volume.exe - exe_args: voice: sounds: - ok1 @@ -18,7 +17,6 @@ list: - command: action: ahk exe_path: ahk/Mute volume.exe - exe_args: voice: sounds: - ok1 @@ -28,4 +26,75 @@ list: phrases: - включи звук - режим со звуком - - верни звук \ No newline at end of file + - верни звук + +- command: + action: ahk + exe_path: ahk/Set sound.exe + exe_args: + - 25 + voice: + sounds: + - ok1 + - ok2 + - ok3 + - ok4 + phrases: + - звук на минимум + - громкость на минимум + - убавь звук + - сделай потише + - убавь громоксть + - поставь звук на минимум + - поставь громкость на минимум + - установи звук на минимум + - установи громкость на минимум + - минимальный уровень громкости + +- command: + action: ahk + exe_path: ahk/Set sound.exe + exe_args: + - 50 + voice: + sounds: + - ok1 + - ok2 + - ok3 + - ok4 + phrases: + - звук пятьдесят + - громкость пятьдесят + - поставь звук на пятьдесят + - поставь громкость на пятьдесят + - установи звук на пятьдесят + - установи громкость на пятьдесят + - громкость на середину + - средний уровень громкости + - поставь звук на середину + - установи громкость на середину + - средний уровень громкости + +- command: + action: ahk + exe_path: ahk/Set sound.exe + exe_args: + - 100 + voice: + sounds: + - ok1 + - ok2 + - ok3 + - ok4 + phrases: + - звук сто + - громкость сто + - поставь звук на сто + - поставь громкость на сто + - установи звук на сто + - установи громкость на сто + - громкость на максимум + - установи громкость на максимум + - звук на максимум + - полная громкость + - полный уровень громкости \ No newline at end of file diff --git a/src-tauri/commands/windows/ahk/screenshot.ahk b/src-tauri/commands/windows/ahk/screenshot.ahk index 87b5b9b..2e72591 100644 --- a/src-tauri/commands/windows/ahk/screenshot.ahk +++ b/src-tauri/commands/windows/ahk/screenshot.ahk @@ -1 +1,3 @@ -Send, #{PrintScreen} \ No newline at end of file +Send {PrintScreen down} ; Press down the PrintScreen key. +Sleep 500 ; Keep it down +Send {Up PrintScreen} ; Release the PrintScreen key. \ No newline at end of file diff --git a/src-tauri/commands/windows/ahk/screenshot.exe b/src-tauri/commands/windows/ahk/screenshot.exe index 046f4d4..26dd243 100644 Binary files a/src-tauri/commands/windows/ahk/screenshot.exe and b/src-tauri/commands/windows/ahk/screenshot.exe differ diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs index c481bc5..8142f09 100644 --- a/src-tauri/src/config.rs +++ b/src-tauri/src/config.rs @@ -43,7 +43,7 @@ pub const VOSK_MODEL_PATH: &str = "vosk/model_small"; pub const VOSK_MIN_RATIO: f64 = 70.0; // ETC -pub const CMD_RATIO_THRESHOLD: f64 = 60f64; +pub const CMD_RATIO_THRESHOLD: f64 = 65f64; pub const CMS_WAIT_DELAY: std::time::Duration = std::time::Duration::from_secs(15); pub const ASSISTANT_GREET_PHRASES: [&str; 3] = ["greet1", "greet2", "greet3"]; diff --git a/src-tauri/src/tauri_commands/listener.rs b/src-tauri/src/tauri_commands/listener.rs index 944fc7f..1b979ca 100644 --- a/src-tauri/src/tauri_commands/listener.rs +++ b/src-tauri/src/tauri_commands/listener.rs @@ -63,7 +63,7 @@ fn get_wake_word_engine() -> config::WakeWordEngine { "rustpotter" => selected_wake_word_engine = config::WakeWordEngine::Rustpotter, "vosk" => selected_wake_word_engine = config::WakeWordEngine::Vosk, "picovoice" => selected_wake_word_engine = config::WakeWordEngine::Porcupine, - &_ => todo!() + _ => selected_wake_word_engine = config::DEFAULT_WAKE_WORD_ENGINE } } else { // default diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6bfd6d4..eec2c34 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -60,7 +60,7 @@ "fullscreen": false, "resizable": false, "title": "Jarvis Voice Assistant", - "width": 500, + "width": 550, "height": 700 } ]