A privacy-focused, locally run AI assistant for Windows enabling voice control of apps, automation, and natural language command parsing.
- Whisper ASR as default with GPU acceleration and Vosk fallback
- Configurable voice detection with adaptive thresholds and background noise learning
- Voice calibration (automatic and manual)
- WhatsApp Web automation via Selenium
- System and application control through pywinauto and GUI automation
- Extensible command parsing powered by local LLM
- Continuous voice recognition improvement through learning
Run the setup script to install dependencies and configure environment:
python setup.pyDownload models:
python download_models.py- Clone the repository:
git clone https://github.com/yourusername/contextual-llm.git
cd contextual-llm- Create virtual environment and activate:
python -m venv ai_assistant
# Windows
ai_assistant\Scripts\activate
# macOS/Linux
source ai_assistant/bin/activate- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
python create_env.pyEdit .env file to your setup (e.g., GPU device, model sizes).
- Download required models (if not using download script):
- Whisper ASR models
- Vosk ASR fallback models
- Piper TTS voices
- Run the assistant:
python src/main.pycontextual-llm/
├── src/
│ ├── core/ # AI core modules
│ │ ├── intent_parser.py
│ │ ├── context_manager.py
│ │ ├── voice_optimizer.py
│ │ ├── command_planner.py
│ │ └── correction_learner.py
│ ├── controllers/ # System controls and automation
│ │ ├── system_controller.py
│ │ ├── app_discovery.py
│ │ └── whatsapp_controller.py
│ ├── interfaces/ # Voice and other interfaces
│ │ └── voice_interface.py
│ ├── parsers/ # Additional parsers if any
│ │ └── command_parser.py
│ ├── llm_manager.py # Conversational AI manager
│ ├── piper_manager.py # TTS manager
│ └── main.py # Entry point
├── models/ # AI models and voices (user needs to download)
├── config/ # Configurations and settings
│ └── settings.json
├── logs/ # Logs and runtime files
├── tests/ # Unit and integration tests (private)
├── requirements.txt # Dependencies
└── README.md # This file
- “Open Notepad”
- “Launch Firefox”
- “Open Word and write a paragraph about AI”
Control model parameters and device setup in .env or config/settings.json.
| Variable | Description | Default |
|---|---|---|
| WHISPER_MODEL | Whisper ASR model size | small |
| WHISPER_DEVICE | Device for Whisper (cuda/cpu) | cuda |
| WHISPER_COMPUTE_TYPE | Model compute precision | int8_float16 |
| OLLAMA_MODEL | Local LLM model | gemma2:2b |
Use branch naming convention:
updates/manvik-ai-coreupdates/person2-app-discoveryupdates/person3-ui-automation
Typical workflow:
git checkout -b updates/yourname-feature
git add .
git commit -m "feat: description"
git push origin updates/yourname-featureOpen a pull request to merge to main.