π΅ Blink Music Controller
Blink_To_Play is a hands-free, eye-blink-based controller for your media player.
It lets you use facial gestures (left eye, right eye, or both blinks) to simulate media keys like play/pause, next/previous track, and even seeking β just by blinking.
Perfect for:
- π Accessibility applications
- π§ Experimental human-computer interaction
- π§ Listening to music without touching your device
| Blink Action | Simulated Keys | Media Action |
|---|---|---|
| Blink both eyes | Ctrl + P |
Play / Pause |
| Blink right eye | Ctrl + F |
Next track |
| Blink left eye | Ctrl + B |
Previous track |
| Long blink (right eye) | Ctrl + β |
Seek forward |
| Long blink (left eye) | Ctrl + β |
Seek backward |
β Works with any media player that supports these shortcuts
Examples: Windows Media Player, VLC, Groove Music
- Uses OpenCV to access your webcam
- Tracks face + eye movement with MediaPipe FaceMesh
- Detects left/right/both eye blinks, and long blinks
- Simulates keyboard shortcuts using pynput
blink_music_controller/ βββ main.py # Main loop: webcam + action triggers βββ eye_tracker.py # Detects left, right, both eye blinks βββ media_keys.py # Simulates media key presses (Ctrl + P, etc.) βββ utils.py # Tracks blink duration for long blinks βββ requirements.txt # Dependencies
- Python 3.10 or 3.11
- Webcam
pip install -r requirements.txt
βΆοΈ Run the Tool
bash
Copy
Edit
python main.py
Make sure your media player window is active
(e.g., click on the WMP or VLC window)
π Requirements
opencv-python
mediapipe
pynput
Already included in requirements.txt
πΈ Screenshots
screenshots coming soon
π οΈ Features to Improve
GUI showing current song, eye status, blink type
Sound or popup feedback after an action
Blink customization (e.g., adjust threshold/delay)
Voice fallback or confirmation mode
π§Ύ License
MIT License β use, share, and improve!
π Author
ACT91
Built with Python, creativity, and a blink of genius π