Skip to content

ibrahimmahafza/AeroPitch-by-Pals-n-tir

Repository files navigation

Guardian Angel

AI-powered real-time navigation assistant for visually impaired users, providing spoken guidance about obstacles and hazards via webcam analysis.

Prerequisites

  • Python 3.10+
  • Webcam (built-in or phone-as-webcam via DroidCam, Camo, etc.)
  • API keys for Google Gemini and ElevenLabs
  • MongoDB instance (local or Atlas)

Setup

  1. Clone the repository:

    git clone <repo-url>
    cd hackathon
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate   # Linux/macOS
    venv\Scripts\activate      # Windows
  3. Install dependencies:

    pip install -r requirements.txt

    Windows note: If pip install fails with path-related errors for google-genai or elevenlabs, Windows long path support may not be enabled. You can either:

    • Enable long paths: run reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f in an admin terminal, then restart and retry pip install
    • Or install to a short path: pip install google-genai elevenlabs -t C:/tmp/pylibs and use run.bat to launch the app
  4. Create your environment file:

    cp .env.example .env
  5. Edit .env and fill in your API keys and MongoDB connection string.

Run

python guardian_angel.py

Or on Windows if you used the short-path install workaround:

run.bat

Press q in the preview window or Ctrl+C in the terminal to exit. Press v to speak a voice command (requires microphone/AirPods).

Configuration

Edit the constants at the top of guardian_angel.py:

  • CAMERA_INDEX -- Camera device index (default 1). If you are using a phone as a webcam, you may need to change this.
  • CAPTURE_INTERVAL_SEC -- Seconds between frame captures (default 1).
  • MIC_DEVICE_INDEX -- Microphone device index for voice commands (default 2 for AirPods).

Running Tests

pytest tests/ -v

If you used the short-path install workaround on Windows, set PYTHONPATH first:

set PYTHONPATH=C:/tmp/pylibs && pytest tests/ -v

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors