How priler/jarvis works
Project Type and Overall Purpose
• This is a full-stack, offline voice assistant application.
• The backend is written in Rust (using Cargo and Tauri for the desktop integration) that handles core voice functionalities – speech-to-text (using Vosk), wake-word detection (via Rustpotter and Porcupine), and command execution (including an interesting array of commands driven by AutoHotkey scripts).
• The frontend is built with Vite and Svelte (via Tauri) to provide the user interface.
• The project architecture emphasizes offline operation, privacy, and open-source transparency.
File Structure for Architectural Components
• The directory tree clearly separates the backend (in the “app” folder) from the GUI (in the “gui” folder):
• “app” contains Rust source code (in app/src) for various modules like audio handling (audio.rs, recorder/*), speech-to-text (stt/*), listener modules (including integrations for porcupine, vosk, and rustpotter), and configuration/logging.
• Within “app”, the “commands” directory organizes a set of system actions (like browser control, calculator, steam, volume, windows, etc.) with each command having its own YAML configuration and associated AutoHotkey (AHK/EXE) scripts. This makes it clear that command processing is modular.
• “gui” holds the frontend code developed in Svelte, with Tauri configuration files linking to the Rust backend. It also includes static assets, CSS, and TypeScript files.
Instructing the Principal Software Engineer
– “User Interface (Svelte, Vite)” connected to “Tauri Bridge”.
– “Audio Input Module” (recorder).
– “Speech-To-Text Module (Vosk)”.
– “Wake Word Detection (Rustpotter/Porcupine)” within the “Listener Module”.
– “Command Engine” (with submodules per command: browser, calculator, steam, etc.).
– “Configuration/Database/Logging” modules.
– “Neural Networks / Future NLU Integration” (even if not fully implemented yet).
– From the GUI to the backend showing Tauri commands.
– From the audio input to the STT module, then to the listener.
– From the listener to the command engine.
– From the command engine outwards to invoking system-level actions (via AutoHotkey).
– UI components vs. backend logic.
– System integration components (e.g., audio, STT, wake-word) versus configuration/support modules.
– External dependencies (e.g., Vosk models, AHK scripts) should be clearly annotated.
Final Recommendations
– Keep all components clearly labeled and well-organized.