A highly optimized, visually stunning, and hands-free custom desktop environment built on Arch Linux and the Hyprland window manager. This project combines a modern Catppuccin-themed layout with a robust background voice automation engine, system maintenance daemons, and local AI (Ollama) synthesis.
The system coordinates speech processing, desktop events, and graphical indicators asynchronously:
graph TD
User([🎙️ User Speech]) -->|Super + V / Wake Word| Mic[ALSA / PulseAudio Microphone]
Mic -->|Audio Buffer| VA[Voice Assistant Engine]
VA -->|STT: Google / Sphinx API| Parse{Command Router}
Parse -->|Ollama Query| Ollama[Local Ollama: Llama3]
Ollama -->|AI Text Output| TTS[Text-to-Speech: pyttsx3 / Espeak]
Parse -->|System Match| Cmd[Shell Command Executor]
Cmd -->|hyprctl dispatch| Hyprland[Hyprland Window Manager]
Cmd -->|Waybar Toggle| Waybar[Waybar Panels]
Cmd -->|System Script| Maintenance[Maintenance Agent]
VA -->|Audio Feedback / Alert| Sounds[System Audio Cues]
VA -->|Status / Log Output| Notification[notify-send Desktop Notifications]
Daemon[Systemd User Daemon] -->|Manages Background| VA
AGS[AGS Control Center] -->|Polls Status / Trigger| Daemon
- Instant Voice Orchestration: Perform window navigation, system adjustments, and menu actions hands-free.
- Local LLM Integration (Ollama): Route questions to local models via voice commands ("ask ai...") and receive spoken responses.
- Zero-Dependency Virtual Env Setup: Full Python package isolation to ensure clean system installations (PEP 668 compliant).
- AGS Control Center Panel: A GTK-based Control Center with a voice automation monitor, real-time daemon status indicator, and manual trigger button.
- Dynamic Waybar Toggle: Switch seamlessly between horizontal and vertical status bars.
- Automated Housekeeping Timers: Daily systemd timer that runs cache cleaning, package cache prunes (via
paccache), and log prunes, displaying visual notifications of space freed. - Premium Theme & Aesthetics: Cohesive dark aesthetic styled around Catppuccin Mocha colors.
To deploy this environment, you must be running Arch Linux with a working audio setup (PipeWire, PulseAudio, or ALSA).
Ensure git and sudo are installed before running:
sudo pacman -S --needed gitFollow these commands to deploy the environment on a fresh Arch Linux system:
# 1. Clone the repository
git clone https://github.com/wasifshaffaq/voice-driven-linux.git
cd voice-driven-linux
# 2. Make the installer executable
chmod +x install.sh
# 3. Run the master deployment script
./install.sh- Core Packages: Installs Hyprland, Waybar, Rofi (Wayland), Kitty, GNU Stow, system audio utilities, and nerd fonts.
- Audio/STT Support: Installs
portaudio(for python-pyaudio),espeak-ng(for offline TTS),pacman-contrib(forpaccache), andalsa-utils. - AUR Helpers: Checks for and installs
paruif not found. - AUR Packages: Deploys
aylurs-gtk-shell(AGS),swww(wallpaper manager),libinput-gestures, andauto-cpufreq. - Config Symlinking: Uses
stowto securely symlink configuration folders into your home directory (~/.config/). - Python Sandbox Environment: Creates a virtual environment in
~/.config/voice-assistant/venv/and installs pip dependencies (SpeechRecognition,pyaudio,pyttsx3,requests). - Systemd Services: Loads and enables the background voice daemon (
voice-assistant.service) and the daily maintenance timers (system-maintenance.timer).
The voice assistant can be triggered in three ways:
- Hotkey (On-Demand Mode): Press
SUPER + V(Windows key + V) on your keyboard. The system will play an audio cue and listen for a single command. - Wake Word (Daemon Mode): Say
"computer"close to your microphone. The assistant will wake up and listen for your instruction. - Control Center Button: Open the Control Center with
SUPER + Cand click theSpeak Commandbutton.
All speech commands are mapped dynamically in commands.json.
| Target Action | Voice Prompt Examples | Executed Command |
|---|---|---|
| Launch Terminal | "open terminal", "launch terminal" | hyprctl dispatch exec kitty |
| Close Window | "close window", "kill active" | hyprctl dispatch killactive |
| Open Menu | "open menu", "launch menu" | rofi -show drun |
| Toggle Status Bar | "toggle waybar", "toggle bar" | ~/.config/waybar/scripts/toggle_waybar.sh |
| Increase Volume | "volume up", "increase volume" | wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ |
| Decrease Volume | "volume down", "decrease volume" | wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- |
| Mute Volume | "mute audio", "toggle mute" | wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle |
| AI LLM Query | "ask ai [your question]" | Route to local Ollama API (llama3) & speaks response |
| Run Maintenance | "system clean", "run cleanup" | Executes local disk space/log vacuum maintenance |
| System Update | "system update", "update packages" | Launches package manager upgrade in terminal |
Add your own voice triggers and system shell actions by editing the JSON mapping file:
nano ~/.config/voice-assistant/commands.jsonExample command entry:
{
"pattern": "^open browser|launch firefox$",
"command": "hyprctl dispatch exec firefox",
"response": "Launching Web Browser"
}Verify command parsing and matching rules using the built-in test runner:
python test_voice_assistant.pyIf the voice assistant background daemon is not responding, inspect the systemd user service logs:
systemctl --user status voice-assistant.service
journalctl --user -u voice-assistant.service -n 50 -f- Ensure your microphone is active and not hardware-muted:
alsamixer - Check default audio inputs using wireplumber:
wpctl status
├── dotfiles
│ └── .config
│ ├── ags # Aylurs GTK Shell configs (Control Center)
│ ├── hypr # Hyprland Window Manager configurations
│ ├── rofi # Application Menu styling
│ ├── systemd # User Systemd Services & Timers
│ ├── voice-assistant # Voice engine (Python, Commands configuration)
│ └── waybar # Status bar layouts (vertical and horizontal)
├── install.sh # System deployment and setup orchestrator
├── test_voice_assistant.py # Python unit tests for the command logic
└── README.md # Documentation
This project is open-source and available under the MIT License.