A real-time Morse code interpreter powered by Computer Vision and AI. Uses MediaPipe hand-tracking and OpenCV to decode Morse signals from finger gestures, with intelligent LLM-based text correction for seamless human-to-machine communication.
MorseAI lets you type Morse code using finger gestures in front of a webcam. The system detects hand movements in real time through computer vision, decodes the Morse into text, and automatically corrects errors using a Large Language Model.
Right hand — Morse input:
- Thumb + Index → Dot
· - Thumb + Middle → Dash
−
Left hand — Control:
- Thumb + Index → Validate letter
- Thumb + Middle → New word + AI correction
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Finger │ ──▶ │ MediaPipe │ ──▶ │ Morse │ ──▶ │ LLM │
│ Gestures │ │ + OpenCV │ │ Decoding │ │ Correction │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
Input Computer Vision · − → Letter Corrected text
- Python 3.10+
- Working webcam
# Clone the repo
git clone git@github.com:A-Kamil/MorseAi.git
cd morseai
# Install dependencies
pip install -r requirements.txtmediapipe
opencv-python
flask
requests
python web_app.pyOpen your browser at the address shown in the terminal.
- Place both hands in front of the camera
- Right hand: touch thumb + index for a dot, thumb + middle for a dash
- Left hand: touch thumb + index to validate a letter, thumb + middle to separate words and trigger AI correction
- Raw text and AI-corrected text are displayed in real time
| Technology | Role |
|---|---|
| MediaPipe Hands | Real-time detection of 21 hand landmarks per hand |
| OpenCV | Video capture, image processing, landmark display |
| LLM API | Intelligent contextual correction of decoded text |
- ✅ Real-time dual hand gesture detection
- ✅ Morse input by finger choice (index = dot, middle = dash)
- ✅ Live Morse → text decoding
- ✅ Automatic LLM-powered text correction
- ✅ Web interface with buffer, raw phrase, and corrected text display
- ✅ Built-in Morse code reference grid