# kiko-windows-voice-assistant > ๐ŸŽ™๏ธ **Kiko Voice AI**: A native, lightweight, 100% offline Windows desktop voice assistant written in Python. ![License](https://img.shields.io/badge/license-MIT-blue.svg) ![Platform](https://img.shields.io/badge/platform-Windows%2010%20%7C%2011-0078D6.svg) ![Python](https://img.shields.io/badge/python-3.10%2B-3776AB.svg) ![Offline](https://img.shields.io/badge/offline-100%25-brightgreen.svg) ![UI](https://img.shields.io/badge/UI-Double--Buffered%20Tkinter-emerald.svg) --- ## ๐Ÿท๏ธ Repository Tags `voice-assistant` โ€ข `windows-desktop-app` โ€ข `python` โ€ข `offline-assistant` โ€ข `sapi5` โ€ข `speech-recognition` โ€ข `tkinter` โ€ข `pystray` โ€ข `pyinstaller` โ€ข `desktop-automation` โ€ข `local-ai` --- ## ๐ŸŒŸ Key Features - **100% Offline & Private**: Zero cloud APIs, zero audio uploads, zero LLM latency. Powered by Windows SAPI5 Text-to-Speech and local Windows Speech Recognition. - **Sleek Double-Buffered Frameless Dark UI**: - Smooth rounded-corner dark theme container with real-time Input/Output display boxes. - Live status indicator badge (*โ€ข Ready*, *โ€ข Listening*, *โ€ข Processing*, *โ€ข Muted*, *โ€ข Working*). - Offscreen PIL double-buffering (completely eliminates window flickering/blinking). - **System Tray Integration**: - System tray icon menu powered by PyStray. - Menu options: Activate System, Sleep Assistant, Toggle Always-on-Top, Open Settings Folder, Exit. - **Smart Application Control**: - Launch applications (Chrome, Notepad, Calculator, VS Code, Task Manager, etc.). - Close individual applications or close all user apps gracefully while **strictly protecting** Windows Explorer (`explorer.exe`), DWM (`dwm.exe`), and core system services. - **File & Folder Operations**: - Automatic Desktop path resolution (handles OneDrive and localized Desktop folders cleanly). - Create text files directly on Desktop (`ideas.txt`) and auto-open in Notepad. - **Screenshot Tools**: - **Full Screenshot**: Saves timestamped PNG directly to Desktop. - **Region Screenshot**: Triggers Windows region selection (`Win+Shift+S`) and auto-saves cropped selection to Desktop. - **Safe AST Math Calculator**: - Answers spoken math queries ("What is 5,900 plus 7,900?"). - Uses Python `ast` node evaluation (never calls unsafe `eval()` or `exec()`). - **Local SQLite Memory Store**: - Remembers user preferences, notes, and reminders locally at `%LOCALAPPDATA%\KikoVoiceAI\data\memory.db`. --- ## ๐Ÿ“‚ Project Structure ``` kiko-windows-voice-assistant/ โ”‚ โ”œโ”€โ”€ app/ # Core application package โ”‚ โ”œโ”€โ”€ commands/ # Voice command handlers (Apps, Files, Memory, System, Screenshots) โ”‚ โ”œโ”€โ”€ application_index.py # Windows app indexer & process launcher โ”‚ โ”œโ”€โ”€ command_router.py # Regex intent routing engine โ”‚ โ”œโ”€โ”€ config.py # Application configurations & settings loader โ”‚ โ”œโ”€โ”€ event_bus.py # Async event bus pattern โ”‚ โ”œโ”€โ”€ memory_store.py # Local SQLite memory persistence โ”‚ โ”œโ”€โ”€ safety.py # SingleInstanceLock & safe AST evaluation โ”‚ โ”œโ”€โ”€ speech_output.py # Windows SAPI5 TTS engine wrapper โ”‚ โ”œโ”€โ”€ speech_recognition.py # Windows Speech Recognition listener โ”‚ โ”œโ”€โ”€ tray.py # System Tray icon manager โ”‚ โ””โ”€โ”€ ui.py # Double-buffered frameless Tkinter GUI โ”‚ โ”œโ”€โ”€ assets/ # Application icons (.png & .ico) โ”œโ”€โ”€ tests/ # Automated unit test suite โ”œโ”€โ”€ create_icon.py # Icon generator script โ”œโ”€โ”€ main.py # Main application entry point โ”œโ”€โ”€ KikoVoiceAI.spec # PyInstaller build specification โ”œโ”€โ”€ build_windows.bat # Executable build script โ”œโ”€โ”€ run_development.bat # Local dev launch script โ””โ”€โ”€ requirements.txt # Python dependencies ``` --- ## โšก Quick Start & Installation ### Prerequisites - **Windows 10 / 11** - **Python 3.10+** ### Installation 1. **Clone the Repository**: ```bash git clone https://github.com/blazecodeprakhar/kiko-windows-voice-assistant.git cd kiko-windows-voice-assistant ``` 2. **Install Dependencies**: ```bash pip install -r requirements.txt ``` 3. **Run in Development Mode**: ```cmd run_development.bat ``` --- ## ๐ŸŽ™๏ธ How to Use & Voice Commands Speak any of the following wake words to activate Kiko: - *"Kiko"* or *"Kiko wake up"* or *"Wake up"* | Category | Example Voice Commands | Action | | :--- | :--- | :--- | | **System Control** | `"Kiko wake up"`, `"Go to sleep"` | Toggles active listening / sleep mode | | **Applications** | `"Open Calculator"`, `"Open Chrome"`, `"Close Notepad"` | Launches or closes target Windows app | | **Close All** | `"Close all applications"` | Gracefully closes user apps while protecting core OS | | **File Creation** | `"Create a file called notes on desktop"` | Creates `notes.txt` on Desktop and opens Notepad | | **Screenshots** | `"Take a screenshot"`, `"Take a custom screenshot"` | Saves full screenshot or region crop to Desktop | | **Math Calculations**| `"What is 450 multiplied by 12?"` | Evaluates math problem safely using AST | | **Memory Store** | `"Remember that my favorite car is Mustang"` | Saves preference to local SQLite database | | **Web Search** | `"Search YouTube for lofi beats"` | Opens web browser with encoded query | | **Volume Control** | `"Volume up"`, `"Volume down"`, `"Mute volume"` | Adjusts system audio volume | --- ## ๐Ÿ› ๏ธ Building Standalone `.exe` Executable To build the standalone Windows executable (`Kiko.exe`): 1. Run the Windows build script: ```cmd build_windows.bat ``` 2. The compiled executable will be created at: - `Kiko.exe` (in root directory) - `dist/KikoVoiceAI.exe` --- ## ๐Ÿงช Running Unit Tests Run the automated test suite: ```cmd python -m unittest discover -s tests -p "test_*.py" ``` --- ## ๐Ÿ“œ License This project is open-source and released under the **MIT License**.