nazirlouis/ada_local

216

stars

55

commits

Python

primary language

Feb 1, 2026

updated

README

๐Ÿค– A.D.A - Pocket AI

A.D.A Logo

A.D.A (Advanced Digital Assistant) is a fully local, privacy-focused AI assistant for Windows. It combines a beautiful modern GUI with powerful voice control capabilitiesโ€”all running entirely on YOUR computer with no cloud dependency.

๐Ÿ”’ Your data stays on your machine. No API keys required for core functionality. No subscriptions. No data collection.


โœจ Key Features

FeatureDescription
๐ŸŽค Voice ControlWake word detection ("Jarvis") with natural language commands
๐Ÿ’ฌ AI ChatInteractive chat with local LLMs via Ollama with streaming responses
๐Ÿ  Smart HomeControl TP-Link Kasa smart lights and plugs from the app
๐Ÿ“… PlannerManage calendar events, alarms, and timers
๐Ÿ“ฐ Daily BriefingAI-curated news from Technology, Science, and Top Stories
๐ŸŒค๏ธ WeatherCurrent weather and hourly forecast on your dashboard
๐Ÿ” Web SearchSearch the web through voice or chat commands
๐Ÿ–ฅ๏ธ System MonitorReal-time CPU and memory usage in the title bar

๐Ÿ“ธ Screenshots

The application features a sleek Windows 11 Fluent Design aesthetic with dark mode support.


๐Ÿ“‹ Prerequisites

Before you begin, make sure you have:

Required Software

SoftwarePurposeDownload
MinicondaPython environment managerminiconda.io
OllamaLocal AI model serverollama.com
NVIDIA GPU (Recommended)Faster AI inferenceGPU with 4GB+ VRAM

Hardware Recommendations

  • Minimum: 8GB RAM, any modern CPU
  • Recommended: 16GB RAM, NVIDIA GPU with 6GB+ VRAM
  • Storage: ~5GB for models and voice data

๐Ÿš€ Quick Start Guide

Follow these steps to get A.D.A running on your system.

Step 1: Install Miniconda

  1. Download from miniconda.io
  2. Run the installer (use default options)
  3. Open Anaconda Prompt (Windows) or your terminal (macOS/Linux)

Step 2: Install Ollama

  1. Download and install from ollama.com/download
  2. Run the installer (Ollama will start automatically as a background service)

โœ… Ollama runs in the background - no need to start it manually after installation.

Step 3: Download an AI Model

Open a terminal and pull your preferred model. You can choose from:

๐Ÿ”น Option A: Qwen3 (Recommended for most users)

# Fast and efficient - great balance of speed and quality
ollama pull qwen3:1.7b

๐Ÿ”น Option B: DeepSeek R1 (Better reasoning)

# Stronger reasoning capabilities - slightly slower
ollama pull deepseek-r1:1.5b

๐Ÿ’ก Tip: You can switch models anytime in config.py by changing RESPONDER_MODEL.

Verify your model is installed:

ollama list

Step 4: Clone & Set Up the Project

# Clone the repository
git clone https://github.com/your-username/pocket_ai.git
cd pocket_ai

# Create a conda environment
conda create -n ada python=3.11 -y

# Activate the environment
conda activate ada

# Install dependencies
pip install -r requirements.txt

โฑ๏ธ Note: First installation may take 5-10 minutes as PyTorch and other large packages are downloaded.

Step 5: GPU Setup (NVIDIA Users)

For significantly faster AI inference, install PyTorch with CUDA support:

# Install PyTorch with CUDA 12.4 support
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Verify CUDA is working:

python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"

๐Ÿ’ก CPU-only users: Skip this stepโ€”PyTorch will use CPU by default. It's slower but works fine.

Step 6: Run the Application

python main.py

๐ŸŽ‰ That's it! A.D.A will launch with a beautiful GUI.


๐ŸŽฎ GPU Acceleration

A.D.A benefits greatly from GPU acceleration. Here's what runs on your GPU:

ComponentGPU BenefitWithout GPU
Router Model~50ms inference~200ms inference
Ollama LLMFast streaming responsesSlower, but functional
Whisper STTReal-time transcriptionSlight delay

CUDA Requirements

  • NVIDIA GPU with CUDA Compute Capability 5.0+ (GTX 900 series or newer)
  • CUDA Toolkit: Bundled with PyTorchโ€”no separate install needed
  • VRAM: 4GB minimum, 6GB+ recommended

Check Your GPU

# View GPU info and VRAM
nvidia-smi

๐Ÿค– Automatic Model Downloads

The following models are downloaded automatically on first runโ€”no manual setup required:

ModelPurposeSizeDownloaded From
Router ModelIntent classification~500MBHugging Face
TTS VoiceText-to-speech~50MBPiper Voices
STT ModelSpeech-to-text (Whisper)~150MBOpenAI Whisper

๐Ÿ“ฆ First launch will take a few minutes while these models download. Subsequent launches are instant.


๐ŸŽ™๏ธ Voice Assistant Setup

A.D.A includes Alexa-like voice control with wake word detection.

How It Works

  1. Say "Jarvis" to wake the assistant
  2. Speak your command naturally
  3. A.D.A processes your request and responds

Example Voice Commands

CommandWhat It Does
"Jarvis, turn on the office lights"Controls smart lights
"Jarvis, set a timer for 10 minutes"Creates a countdown timer
"Jarvis, what's on my schedule today?"Reads your calendar
"Jarvis, search the web for Python tutorials"Performs web search
"Jarvis, add buy groceries to my to-do list"Creates a task

Voice Configuration

Edit config.py to customize:

# Change wake word (default: "jarvis")
WAKE_WORD = "jarvis"

# Adjust sensitivity (0.0-1.0, lower = less false positives)
WAKE_WORD_SENSITIVITY = 0.4

# Enable/disable voice assistant
VOICE_ASSISTANT_ENABLED = True

โš™๏ธ Configuration

All configuration is centralized in config.py:

AI Models

Change the chat model in config.py:

# The main chat model (runs on Ollama)
# Options: "qwen3:1.7b" (fast) or "deepseek-r1:1.5b" (better reasoning)
RESPONDER_MODEL = "qwen3:1.7b"

# Ollama server URL (usually no need to change)
OLLAMA_URL = "http://localhost:11434/api"

Model Comparison:

ModelSpeedReasoningBest For
qwen3:1.7bโšก FastGoodDaily use, quick responses
deepseek-r1:1.5bModerateExcellentMath, coding, complex questions

Text-to-Speech

# Voice model (downloads automatically on first run)
TTS_VOICE_MODEL = "en_GB-northern_english_male-medium"

Weather Location

The default location is New York City. To change it:

  1. Open the app
  2. Go to Settings tab
  3. Enter your latitude and longitude

๐Ÿ—๏ธ Project Architecture

pocket_ai/
โ”œโ”€โ”€ main.py                 # Application entry point
โ”œโ”€โ”€ config.py               # Centralized configuration
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”‚
โ”œโ”€โ”€ core/                   # Backend logic
โ”‚   โ”œโ”€โ”€ router.py           # FunctionGemma intent classifier
โ”‚   โ”œโ”€โ”€ function_executor.py # Executes routed functions
โ”‚   โ”œโ”€โ”€ voice_assistant.py  # Voice pipeline orchestrator
โ”‚   โ”œโ”€โ”€ stt.py              # Speech-to-text with wake word
โ”‚   โ”œโ”€โ”€ tts.py              # Piper text-to-speech
โ”‚   โ”œโ”€โ”€ kasa_control.py     # Smart home device control
โ”‚   โ”œโ”€โ”€ weather.py          # Open-Meteo weather API
โ”‚   โ”œโ”€โ”€ news.py             # DuckDuckGo news + AI curation
โ”‚   โ”œโ”€โ”€ tasks.py            # To-do list management
โ”‚   โ”œโ”€โ”€ calendar_manager.py # Local calendar/events
โ”‚   โ”œโ”€โ”€ history.py          # SQLite chat history
โ”‚   โ””โ”€โ”€ llm.py              # Ollama LLM interface
โ”‚
โ”œโ”€โ”€ gui/                    # PySide6 GUI
โ”‚   โ”œโ”€โ”€ app.py              # Main window setup
โ”‚   โ”œโ”€โ”€ handlers.py         # Chat message handling
โ”‚   โ”œโ”€โ”€ tabs/               # Individual tab screens
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard.py    # Weather + status overview
โ”‚   โ”‚   โ”œโ”€โ”€ chat.py         # AI chat interface
โ”‚   โ”‚   โ”œโ”€โ”€ planner.py      # Calendar + tasks
โ”‚   โ”‚   โ”œโ”€โ”€ briefing.py     # AI news curation
โ”‚   โ”‚   โ”œโ”€โ”€ home_automation.py  # Smart device control
โ”‚   โ”‚   โ””โ”€โ”€ settings.py     # App configuration
โ”‚   โ””โ”€โ”€ components/         # Reusable UI widgets
โ”‚
โ”œโ”€โ”€ merged_model/           # Fine-tuned FunctionGemma router
โ””โ”€โ”€ demo.py                 # Standalone voice assistant demo

How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  User Input โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚ FunctionGemma   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  Function   โ”‚
โ”‚  (Voice/Text)  โ”‚     โ”‚   Router         โ”‚     โ”‚  Executor   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                    โ”‚
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚                                            โ”‚                โ”‚
       โ–ผ                                            โ–ผ                โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Kasa Lights โ”‚                          โ”‚   Calendar   โ”‚   โ”‚  Web Search  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                    โ”‚
                                                    โ–ผ
                                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                          โ”‚ Qwen LLM     โ”‚
                                          โ”‚ (via Ollama) โ”‚
                                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                    โ”‚
                                                    โ–ผ
                                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                          โ”‚ Piper TTS    โ”‚
                                          โ”‚ (Voice Out)  โ”‚
                                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. User speaks or types a command
  2. FunctionGemma Router (fine-tuned local AI) classifies intent
  3. Function Executor runs the appropriate action
  4. Qwen LLM generates a natural language response
  5. Piper TTS speaks the response (if voice enabled)

๐Ÿ  Smart Home Integration

A.D.A supports TP-Link Kasa smart devices:

Supported Devices

  • โœ… Smart bulbs (on/off, brightness, color)
  • โœ… Smart plugs (on/off)
  • โœ… Smart light strips

Setup

  1. Ensure your Kasa devices are on the same network as your computer
  2. Open A.D.A and go to the Home Automation tab
  3. Click Refresh to scan for devices
  4. Control devices through the GUI or voice commands

Voice Commands

"Turn on the living room lights"
"Set the bedroom lights to 50%"
"Turn off all lights"
"Change the office light to blue"

๐Ÿ”ง Troubleshooting

Common Issues

โŒ Ollama connection refused

Problem: The app can't connect to Ollama.

Solution:

  1. Make sure Ollama is running: ollama serve
  2. Check if the model is downloaded: ollama list
  3. Verify the URL in config.py matches your setup
โŒ CUDA/GPU not detected

Problem: PyTorch is running on CPU instead of GPU.

Solution:

  1. Install CUDA-compatible PyTorch:
    pip install torch --index-url https://download.pytorch.org/whl/cu121
    
  2. Verify CUDA: python -c "import torch; print(torch.cuda.is_available())"
โŒ Voice assistant not working

Problem: Wake word isn't being detected.

Solution:

  1. Check your microphone permissions
  2. Ensure realtimestt is installed: pip install realtimestt
  3. Try lowering WAKE_WORD_SENSITIVITY in config.py
โŒ Smart devices not found

Problem: Kasa devices don't appear in the app.

Solution:

  1. Ensure devices are on the same WiFi network
  2. Try the Kasa app first to verify devices work
  3. Check firewall isn't blocking device discovery (UDP port 9999)

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: pytest tests/
  5. Submit a pull request

๐Ÿ“œ License

This project is open source. See LICENSE for details.


๐Ÿ™ Acknowledgments


Made with โค๏ธ for local AI enthusiasts

Contributors

nazirlouis

55 commits

nazirlouis/ada_local

216

stars

55

commits

Python

primary language

Feb 1, 2026

updated

README

๐Ÿค– A.D.A - Pocket AI

A.D.A Logo

A.D.A (Advanced Digital Assistant) is a fully local, privacy-focused AI assistant for Windows. It combines a beautiful modern GUI with powerful voice control capabilitiesโ€”all running entirely on YOUR computer with no cloud dependency.

๐Ÿ”’ Your data stays on your machine. No API keys required for core functionality. No subscriptions. No data collection.


โœจ Key Features

FeatureDescription
๐ŸŽค Voice ControlWake word detection ("Jarvis") with natural language commands
๐Ÿ’ฌ AI ChatInteractive chat with local LLMs via Ollama with streaming responses
๐Ÿ  Smart HomeControl TP-Link Kasa smart lights and plugs from the app
๐Ÿ“… PlannerManage calendar events, alarms, and timers
๐Ÿ“ฐ Daily BriefingAI-curated news from Technology, Science, and Top Stories
๐ŸŒค๏ธ WeatherCurrent weather and hourly forecast on your dashboard
๐Ÿ” Web SearchSearch the web through voice or chat commands
๐Ÿ–ฅ๏ธ System MonitorReal-time CPU and memory usage in the title bar

๐Ÿ“ธ Screenshots

The application features a sleek Windows 11 Fluent Design aesthetic with dark mode support.


๐Ÿ“‹ Prerequisites

Before you begin, make sure you have:

Required Software

SoftwarePurposeDownload
MinicondaPython environment managerminiconda.io
OllamaLocal AI model serverollama.com
NVIDIA GPU (Recommended)Faster AI inferenceGPU with 4GB+ VRAM

Hardware Recommendations

  • Minimum: 8GB RAM, any modern CPU
  • Recommended: 16GB RAM, NVIDIA GPU with 6GB+ VRAM
  • Storage: ~5GB for models and voice data

๐Ÿš€ Quick Start Guide

Follow these steps to get A.D.A running on your system.

Step 1: Install Miniconda

  1. Download from miniconda.io
  2. Run the installer (use default options)
  3. Open Anaconda Prompt (Windows) or your terminal (macOS/Linux)

Step 2: Install Ollama

  1. Download and install from ollama.com/download
  2. Run the installer (Ollama will start automatically as a background service)

โœ… Ollama runs in the background - no need to start it manually after installation.

Step 3: Download an AI Model

Open a terminal and pull your preferred model. You can choose from:

๐Ÿ”น Option A: Qwen3 (Recommended for most users)

# Fast and efficient - great balance of speed and quality
ollama pull qwen3:1.7b

๐Ÿ”น Option B: DeepSeek R1 (Better reasoning)

# Stronger reasoning capabilities - slightly slower
ollama pull deepseek-r1:1.5b

๐Ÿ’ก Tip: You can switch models anytime in config.py by changing RESPONDER_MODEL.

Verify your model is installed:

ollama list

Step 4: Clone & Set Up the Project

# Clone the repository
git clone https://github.com/your-username/pocket_ai.git
cd pocket_ai

# Create a conda environment
conda create -n ada python=3.11 -y

# Activate the environment
conda activate ada

# Install dependencies
pip install -r requirements.txt

โฑ๏ธ Note: First installation may take 5-10 minutes as PyTorch and other large packages are downloaded.

Step 5: GPU Setup (NVIDIA Users)

For significantly faster AI inference, install PyTorch with CUDA support:

# Install PyTorch with CUDA 12.4 support
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Verify CUDA is working:

python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"

๐Ÿ’ก CPU-only users: Skip this stepโ€”PyTorch will use CPU by default. It's slower but works fine.

Step 6: Run the Application

python main.py

๐ŸŽ‰ That's it! A.D.A will launch with a beautiful GUI.


๐ŸŽฎ GPU Acceleration

A.D.A benefits greatly from GPU acceleration. Here's what runs on your GPU:

ComponentGPU BenefitWithout GPU
Router Model~50ms inference~200ms inference
Ollama LLMFast streaming responsesSlower, but functional
Whisper STTReal-time transcriptionSlight delay

CUDA Requirements

  • NVIDIA GPU with CUDA Compute Capability 5.0+ (GTX 900 series or newer)
  • CUDA Toolkit: Bundled with PyTorchโ€”no separate install needed
  • VRAM: 4GB minimum, 6GB+ recommended

Check Your GPU

# View GPU info and VRAM
nvidia-smi

๐Ÿค– Automatic Model Downloads

The following models are downloaded automatically on first runโ€”no manual setup required:

ModelPurposeSizeDownloaded From
Router ModelIntent classification~500MBHugging Face
TTS VoiceText-to-speech~50MBPiper Voices
STT ModelSpeech-to-text (Whisper)~150MBOpenAI Whisper

๐Ÿ“ฆ First launch will take a few minutes while these models download. Subsequent launches are instant.


๐ŸŽ™๏ธ Voice Assistant Setup

A.D.A includes Alexa-like voice control with wake word detection.

How It Works

  1. Say "Jarvis" to wake the assistant
  2. Speak your command naturally
  3. A.D.A processes your request and responds

Example Voice Commands

CommandWhat It Does
"Jarvis, turn on the office lights"Controls smart lights
"Jarvis, set a timer for 10 minutes"Creates a countdown timer
"Jarvis, what's on my schedule today?"Reads your calendar
"Jarvis, search the web for Python tutorials"Performs web search
"Jarvis, add buy groceries to my to-do list"Creates a task

Voice Configuration

Edit config.py to customize:

# Change wake word (default: "jarvis")
WAKE_WORD = "jarvis"

# Adjust sensitivity (0.0-1.0, lower = less false positives)
WAKE_WORD_SENSITIVITY = 0.4

# Enable/disable voice assistant
VOICE_ASSISTANT_ENABLED = True

โš™๏ธ Configuration

All configuration is centralized in config.py:

AI Models

Change the chat model in config.py:

# The main chat model (runs on Ollama)
# Options: "qwen3:1.7b" (fast) or "deepseek-r1:1.5b" (better reasoning)
RESPONDER_MODEL = "qwen3:1.7b"

# Ollama server URL (usually no need to change)
OLLAMA_URL = "http://localhost:11434/api"

Model Comparison:

ModelSpeedReasoningBest For
qwen3:1.7bโšก FastGoodDaily use, quick responses
deepseek-r1:1.5bModerateExcellentMath, coding, complex questions

Text-to-Speech

# Voice model (downloads automatically on first run)
TTS_VOICE_MODEL = "en_GB-northern_english_male-medium"

Weather Location

The default location is New York City. To change it:

  1. Open the app
  2. Go to Settings tab
  3. Enter your latitude and longitude

๐Ÿ—๏ธ Project Architecture

pocket_ai/
โ”œโ”€โ”€ main.py                 # Application entry point
โ”œโ”€โ”€ config.py               # Centralized configuration
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”‚
โ”œโ”€โ”€ core/                   # Backend logic
โ”‚   โ”œโ”€โ”€ router.py           # FunctionGemma intent classifier
โ”‚   โ”œโ”€โ”€ function_executor.py # Executes routed functions
โ”‚   โ”œโ”€โ”€ voice_assistant.py  # Voice pipeline orchestrator
โ”‚   โ”œโ”€โ”€ stt.py              # Speech-to-text with wake word
โ”‚   โ”œโ”€โ”€ tts.py              # Piper text-to-speech
โ”‚   โ”œโ”€โ”€ kasa_control.py     # Smart home device control
โ”‚   โ”œโ”€โ”€ weather.py          # Open-Meteo weather API
โ”‚   โ”œโ”€โ”€ news.py             # DuckDuckGo news + AI curation
โ”‚   โ”œโ”€โ”€ tasks.py            # To-do list management
โ”‚   โ”œโ”€โ”€ calendar_manager.py # Local calendar/events
โ”‚   โ”œโ”€โ”€ history.py          # SQLite chat history
โ”‚   โ””โ”€โ”€ llm.py              # Ollama LLM interface
โ”‚
โ”œโ”€โ”€ gui/                    # PySide6 GUI
โ”‚   โ”œโ”€โ”€ app.py              # Main window setup
โ”‚   โ”œโ”€โ”€ handlers.py         # Chat message handling
โ”‚   โ”œโ”€โ”€ tabs/               # Individual tab screens
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard.py    # Weather + status overview
โ”‚   โ”‚   โ”œโ”€โ”€ chat.py         # AI chat interface
โ”‚   โ”‚   โ”œโ”€โ”€ planner.py      # Calendar + tasks
โ”‚   โ”‚   โ”œโ”€โ”€ briefing.py     # AI news curation
โ”‚   โ”‚   โ”œโ”€โ”€ home_automation.py  # Smart device control
โ”‚   โ”‚   โ””โ”€โ”€ settings.py     # App configuration
โ”‚   โ””โ”€โ”€ components/         # Reusable UI widgets
โ”‚
โ”œโ”€โ”€ merged_model/           # Fine-tuned FunctionGemma router
โ””โ”€โ”€ demo.py                 # Standalone voice assistant demo

How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  User Input โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚ FunctionGemma   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  Function   โ”‚
โ”‚  (Voice/Text)  โ”‚     โ”‚   Router         โ”‚     โ”‚  Executor   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                    โ”‚
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚                                            โ”‚                โ”‚
       โ–ผ                                            โ–ผ                โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Kasa Lights โ”‚                          โ”‚   Calendar   โ”‚   โ”‚  Web Search  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                    โ”‚
                                                    โ–ผ
                                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                          โ”‚ Qwen LLM     โ”‚
                                          โ”‚ (via Ollama) โ”‚
                                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                    โ”‚
                                                    โ–ผ
                                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                          โ”‚ Piper TTS    โ”‚
                                          โ”‚ (Voice Out)  โ”‚
                                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. User speaks or types a command
  2. FunctionGemma Router (fine-tuned local AI) classifies intent
  3. Function Executor runs the appropriate action
  4. Qwen LLM generates a natural language response
  5. Piper TTS speaks the response (if voice enabled)

๐Ÿ  Smart Home Integration

A.D.A supports TP-Link Kasa smart devices:

Supported Devices

  • โœ… Smart bulbs (on/off, brightness, color)
  • โœ… Smart plugs (on/off)
  • โœ… Smart light strips

Setup

  1. Ensure your Kasa devices are on the same network as your computer
  2. Open A.D.A and go to the Home Automation tab
  3. Click Refresh to scan for devices
  4. Control devices through the GUI or voice commands

Voice Commands

"Turn on the living room lights"
"Set the bedroom lights to 50%"
"Turn off all lights"
"Change the office light to blue"

๐Ÿ”ง Troubleshooting

Common Issues

โŒ Ollama connection refused

Problem: The app can't connect to Ollama.

Solution:

  1. Make sure Ollama is running: ollama serve
  2. Check if the model is downloaded: ollama list
  3. Verify the URL in config.py matches your setup
โŒ CUDA/GPU not detected

Problem: PyTorch is running on CPU instead of GPU.

Solution:

  1. Install CUDA-compatible PyTorch:
    pip install torch --index-url https://download.pytorch.org/whl/cu121
    
  2. Verify CUDA: python -c "import torch; print(torch.cuda.is_available())"
โŒ Voice assistant not working

Problem: Wake word isn't being detected.

Solution:

  1. Check your microphone permissions
  2. Ensure realtimestt is installed: pip install realtimestt
  3. Try lowering WAKE_WORD_SENSITIVITY in config.py
โŒ Smart devices not found

Problem: Kasa devices don't appear in the app.

Solution:

  1. Ensure devices are on the same WiFi network
  2. Try the Kasa app first to verify devices work
  3. Check firewall isn't blocking device discovery (UDP port 9999)

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: pytest tests/
  5. Submit a pull request

๐Ÿ“œ License

This project is open source. See LICENSE for details.


๐Ÿ™ Acknowledgments


Made with โค๏ธ for local AI enthusiasts

Contributors

nazirlouis

55 commits

Languages

Python

100.0%