A modern, open-source assistive communication system for individuals with ALS, inspired by Stephen Hawking's ACAT system. This system leverages eye-tracking technology to enable users to type messages and receive intelligent, context-aware sentence completions.
- Eye-Tracking Control: Uses MediaPipe for real-time eye detection and cursor control
- Virtual Keyboard: Large, high-contrast virtual keyboard with dwell-to-click selection
- AI-Powered Suggestions: Context-aware sentence completions using Google's Gemini API
- Multi-Language Support: Supports English and Greek keyboards with easy expansion
- Real-Time Information: Integrates current weather and news headlines
- Containerized Deployment: Complete Docker-based deployment for easy setup
- Kiosk Mode: Full-screen browser mode for distraction-free use
-
Clone the repository:
git clone <repository-url> cd zekALS-containers
-
Run the setup script: Open PowerShell as Administrator and run:
.\setup-windows.ps1This will help you install required tools like Chocolatey, Python, Node.js, and Docker Desktop.
-
Configure your API keys:
notepad .env # Add your GEMINI_API_KEY and other settings -
Start the system in development mode:
.\run-dev.bat
-
Clone the repository:
git clone <repository-url> cd zekALS-containers
-
Run the setup script:
./setup-ubuntu.sh
This will install all dependencies, set up Docker, and create the environment file.
-
Configure your API keys:
nano .env # Add your GEMINI_API_KEY and other settings -
Start the system:
./run-ubuntu.sh
-
Open in kiosk mode (recommended for actual use):
./run-kiosk.sh
If you prefer manual setup:
-
Create environment file:
cp .env.example .env # Edit .env with your API keys and settings -
Build and run:
docker-compose build docker-compose up
-
Access the application:
- Open your browser to
http://localhost:8080
- Open your browser to
| Script | OS | Purpose |
|---|---|---|
setup-windows.ps1 |
Windows | Guides through dependency installation. |
run-dev.bat |
Windows | Runs the application in development mode. |
system-check.ps1 |
Windows | Checks system requirements. |
./setup-ubuntu.sh |
Linux | Complete system setup and dependency installation |
./run-ubuntu.sh |
Linux | Start the complete system using Docker |
./run-kiosk.sh |
Linux | Launch browser in full-screen kiosk mode |
./run-dev.sh |
Linux | Run in development mode (without Docker) |
./system-check.sh |
Linux | Check system requirements and diagnose issues |
- Ubuntu 20.04+ (or compatible Linux distribution)
- 4GB RAM
- USB webcam or built-in camera
- Internet connection (for AI features)
- Ubuntu 22.04+
- 8GB RAM
- High-quality webcam (1080p)
- GPU with CUDA support (for faster processing)
The system consists of two main services:
- Eye tracking using MediaPipe
- Mouse cursor control via pyautogui
- WebSocket server for coordinate broadcasting
- Supports both CPU and GPU processing
- Express web server
- Virtual keyboard interface
- WebSocket client for cursor data
- Gemini AI integration for suggestions
- Multi-language support
Create a .env file with the following variables:
# Gemini AI Configuration
GEMINI_API_KEY=your-gemini-api-key-here
LOCATION=Athens, Greece
# Hardware Configuration
HARDWARE_MODE=CPU # or GPU for CUDA acceleration
# Port Configuration
WEBSOCKET_PORT=8765
FRONTEND_PORT=8080
# Application Settings
LANGUAGE=en # en for English, el for Greek
DWELL_TIME=2000 # millisecondsThe system supports multiple languages through JSON configuration files:
languages/en.json- English keyboard layoutlanguages/el.json- Greek keyboard layout
To add a new language:
- Create a new JSON file in the
za-frontend/languages/directory - Define the keyboard layout and UI strings
- Update the language selector in the frontend
-
Webcam not detected:
ls -la /dev/video* # Should show webcam devices
-
Docker permission denied:
sudo usermod -aG docker $USER # Then log out and back in
-
Eye tracking not working:
- Ensure good lighting conditions
- Position webcam at eye level
- Check that no other applications are using the webcam
-
Mouse control not working:
- Verify X11 permissions:
xhost +local:docker - Check display variable:
echo $DISPLAY
- Verify X11 permissions:
Run the system check script for comprehensive diagnostics:
./system-check.sh- Position yourself comfortably in front of the webcam
- Ensure good lighting on your face
- Launch the application in kiosk mode
- The system will automatically track your eye movements
- Look at the desired key on the virtual keyboard
- Keep your gaze steady on the key for 2 seconds
- A ring timer will fill up around the key
- When complete, the character will be added to the text area
- Suggestions appear above the keyboard as you type
- Look at a suggestion and dwell to select it
- Suggestions include:
- Common phrases and completions
- Time-appropriate greetings
- Current weather information
- Recent news headlines
- Use the language toggle button to switch between English and Greek
- The keyboard layout will update immediately
For development and debugging, use the development script:
./run-dev.shThis runs the services directly without Docker, making it easier to see logs and make changes.
zekALS-containers/
βββ docker-compose.yml # Docker orchestration
βββ .env.example # Environment template
βββ setup-ubuntu.sh # Ubuntu setup script
βββ run-ubuntu.sh # Production launcher
βββ run-kiosk.sh # Kiosk mode launcher
βββ run-dev.sh # Development mode
βββ system-check.sh # System diagnostics
βββ za-backend/ # Python backend
β βββ Dockerfile
β βββ eye_tracker.py # Main eye tracking service
β βββ requirements.txt # Python dependencies
β βββ test_websocket.py # WebSocket test client
βββ za-frontend/ # Node.js frontend
βββ Dockerfile
βββ server.js # Express web server
βββ package.json # Node.js dependencies
βββ public/ # Static web files
β βββ index.html # Main UI
β βββ style.css # Styling
β βββ script.js # Frontend logic
βββ languages/ # Keyboard layouts
βββ en.json # English
βββ el.json # Greek
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open-source and available under the MIT License.
- Inspired by Stephen Hawking's ACAT system
- Built with MediaPipe by Google
- Uses Google's Gemini AI for intelligent suggestions
- Greek language support for accessibility
If you encounter issues:
- Run
./system-check.shfor diagnostics - Check the troubleshooting section above
- Review the logs:
docker-compose logs -f - Open an issue on GitHub with detailed information
zekALS - Empowering communication through technology