Skip to content

G-OrdiaD/VoiceAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VoiceAssistant

A Privacy-First, Accessible Voice Interface for Older Adults.
This project was developed as a research initiative to address digital isolation and technological barriers faced by older adults in rural and low-connectivity areas. OffVA delivers a fully local, intuitive task management system that prioritizes user dignity, cognitive economy, and absolute data privacy.


πŸ“œ Research Context & Problem Statement

This project investigates a critical gap in assistive technology: the lack of truly private, offline-first, and cognitively accessible digital aides for older adult populations.

Research Challenge OffVA's Investigative Approach
Digital Isolation & Complex GUIs Replaces complex menus with a structured, natural voice command interface ("Remind me to...") to reduce cognitive load.
Cloud Dependency & Privacy Risks Implements a fully offline stack (Vosk STT, local SQLite DB) to eliminate data exposure and ensure functionality without internet.
Cognitive Economy for Older Adults Employs a high-contrast, decluttered Kivy GUI and linear task flows to support aging-in-place.
Robustness in Assistive Systems Features a dual-interaction model (voice + manual GUI input) to maintain utility when voice recognition fails.

The system was functionally tested and its interaction model validated with users from the target demographic to ensure real-world usability.


✨ Features & Technical Response

Feature Implementation Research Rationale
πŸ” Full Offline Operation Vosk STT engine; PyAudio; local SQLite DB. Privacy-by-design: Eliminates cloud dependency, ensuring no user data leaves the device.
πŸ—„οΈ Encrypted Data-At-Rest cryptography (Fernet) for full-database encryption. Investigates on-device security models for sensitive personal data (health reminders, schedules).
🎀 Structured Voice Parsing Rule-based NLP parser using regex for Remind me to [task] at [time]. Validates a "cognitive economy" hypothesis: Structured commands are more reliable and less mentally taxing than open-ended dialogue for task management.
πŸ”„ Dual-Modal Interaction Synchronized Kivy GUI (manual task entry) and voice channel. Addresses robustness: Provides a fallback interaction channel, ensuring system resilience.
πŸ§ͺ Modular Test Suite pytest unit/integration tests for core modules (security, parser, DB). Promotes research reproducibility and system reliability for longitudinal study.

πŸ—„οΈ System Architecture & Security Model

The architecture is built on the principle of Minimal, Focused Decryption to maximize privacy while maintaining functionality.

Secure Data Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Interaction  β”‚    β”‚         Secure Storage Layer        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Voice: "Remind me  │───▢│ 1. Parse β†’ [task], [time]           β”‚
β”‚  to X at Y"         β”‚    β”‚ 2. Derive Key ← User Passphrase     β”‚
β”‚  or                 β”‚    β”‚ 3. Encrypt Fields β†’ Write to        β”‚
β”‚  Manual GUI Entry   β”‚    β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚    β”‚   πŸ”’ ENCRYPTED SQLITE DB   β”‚   β”‚
                           β”‚    β”‚   tasks.db                 β”‚   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚   Runtime Scheduler β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€                        β”‚ (Encrypted Query)
β”‚ 4. Periodic Check β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚ 5. Decrypt *Time*   β”‚                                           β”‚
β”‚    Field Only       β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚ 6. If time ≀ now ───┼───▢│     Trigger Alert Layer            β”‚β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”‚
                           β”‚β”‚ - Decrypt *Full Task*               β”‚β”‚
                           β”‚β”‚ - TTS Audio Alert                   β”‚β”‚
                           β”‚β”‚ - GUI Notification Popup            β”‚β”‚
                           β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Investigated Security Principles

  1. Encryption at Rest: The entire tasks.db file is encrypted. Investigates practical usability of transparent encryption for non-technical users.
  2. Focused Decryption: The background scheduler decrypts only the reminder time for checking. The task description remains encrypted until alert time. This explores a model of least-privilege data access in local applications.
  3. Key Derivation: The encryption key is derived from a user-provided passphrase via PBKDF2. The key itself is never stored, testing a balance between security and recoverability.

πŸ“ Project Structure

offva/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ data/                 # Data & Encryption Layer
β”‚   β”‚   β”œβ”€β”€ database.py       # Encrypted SQLite interface
β”‚   β”‚   β”œβ”€β”€ encryption.py     # Key derivation & cipher functions
β”‚   β”‚   └── models.py         # Data models
β”‚   β”œβ”€β”€ voice/                # Voice Processing Layer
β”‚   β”‚   β”œβ”€β”€ stt_engine.py     # Vosk speech-to-text
β”‚   β”‚   β”œβ”€β”€ tts_engine.py     # Text-to-speech output
β”‚   β”‚   └── command_parser.py # Rule-based NLP parser
β”‚   β”œβ”€β”€ gui/                  # Kivy UI Layer
β”‚   β”‚   β”œβ”€β”€ main_screen.py
β”‚   β”‚   β”œβ”€β”€ tasks_screen.py
β”‚   β”‚   └── *.kv              # UI layout files
β”‚   β”œβ”€β”€ core/                 # Application Logic
β”‚   β”‚   └── alarm_manager.py  # Background scheduler
β”‚   └── main.py               # Application entry point
β”œβ”€β”€ tests/                    # Test Suite
β”‚   β”œβ”€β”€ integration/
β”‚   β”œβ”€β”€ test_database.py
β”‚   β”œβ”€β”€ test_security.py      # Critical encryption tests
β”‚   └── test_command_parser.py
β”œβ”€β”€ assets/                   # Fonts & Icons
β”œβ”€β”€ requirements.txt          # Python dependencies
└── README.md                 # This file

πŸš€ Installation & Quick Start

Prerequisites

  • Python 3.9+
  • Microphone

Setup

# 1. Clone repository
git clone https://github.com/G-OrdiaD/VoiceAssistant.git
cd VoiceAssistant

# 2. Create virtual environment & install dependencies
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

# 3. Download offline voice model
python download_model.py

# 4. Launch application
python src/main.py

#or
python -m src.main

Basic Usage

  • Voice Command: Say "Remind me to take my medication at 8 PM".
  • Manual Entry: Use the 'Tasks' screen in the GUI.
  • View Reminders: Ask "What are my reminders for today?"

πŸ”¬ Research Findings & Future Directions

Validated Outcomes

  1. Structured voice commands were successfully adopted by test users for routine task creation.
  2. The dual-modal (voice+GUI) interface proved essential for handling recognition errors and user preference.
  3. Local, encrypted storage was implemented without compromising the application's responsiveness.

Open Challenges & Future Work

Research Direction Description
Mobile & Low-Resource Port Extending accessibility by porting to Android/iOS and Raspberry Pi.
Enhanced NLP for Complexity Moving beyond regex to a lightweight local model for parsing more complex command structures.
Longitudinal Usability Study Deploying OffVA in a multi-month study to measure its impact on daily routine adherence and digital confidence.
Secure Local Device Integration Exploring standards like Matter for offline, encrypted integration with smart home devices.

Collaboration is welcome on any of these fronts, particularly in conducting formal user studies or porting efforts.


πŸ§ͺ Testing & Reproducibility

To ensure the integrity of the research implementation:

# Run the complete test suite
pytest

# Run security-critical tests individually
pytest tests/test_security.py -v
pytest tests/test_database.py -v

Test coverage includes encryption/decryption fidelity, voice command parsing accuracy, and database integrity.


πŸ“„ License

This research prototype is released under the MIT License. See the LICENSE file for details. The use of this software in user studies is encouraged with proper attribution.


πŸ™ Acknowledgments

This project stands on the shoulders of pivotal open-source work:

  • Vosk: Enabling accurate, offline speech recognition.
  • Kivy: Providing a cross-platform Python UI framework accessible to older adults.
  • Cryptography.io: Delivering robust, auditable encryption primitives.

VoiceAssistant represents an ongoing inquiry into dignified, private, and accessible personal technology.