Ever wanted to control your computer like Tony Stark? This app uses your webcam and AI to let you adjust volume with simple hand gestures. Pinch to change volume, make a fist to mute. That's it!
| Gesture | Action | Description |
|---|---|---|
| 🤏 Pinch | Volume Control | Bring thumb and index finger closer/apart to decrease/increase volume |
| ✊ Fist | Mute Toggle | Close all fingers to instantly mute/unmute |
| 👁️ Visual Feedback | Hand Tracking | See your hand landmarks tracked in real-time |
| 🎚️ Smooth Transitions | Smart Algorithm | No jarring volume jumps—everything's smooth and natural |
| 🪟 Windows Integration | Native Overlay | Triggers the Windows volume overlay automatically |
- Windows 10/11
- Python 3.7+
- A working webcam
- Decent lighting (helps with hand detection)
# 1. Clone this repo
git clone https://github.com/Younes-Barkat/Hand-Volume-Control.git
cd Hand-Volume-Control
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run it!
python volumeHandControl.pyThat's it! Your webcam will open and you can start controlling volume with your hands.
- Launch the app - Run
python volumeHandControl.py - Show your hand - Position your hand in front of the webcam
- Control away!
- 🤏 Pinch gesture: Move thumb and index finger to adjust volume
- ✊ Fist gesture: Close all fingers to mute
- 👋 Open hand: Unmute and resume control
- Exit - Press
Qor close the window
- Keep your hand within the camera frame
- Make sure you have good lighting
- Smooth movements work better than jerky ones
- The mute gesture requires all fingers to be closed
- OpenCV - Camera capture and video processing
- MediaPipe - Google's ML solution for hand tracking
- NumPy - Numerical operations
- Pycaw - Windows Core Audio API wrapper
- Pynput - Keyboard simulation for Windows overlay
gesture-volume-control/
│
├── volumeHandControl.py # Main application
├── HandTrackingModule.py # Hand detection module
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore file
├── README.md # You are here!
├── 1.gif # Volume control demo
├── 2.gif # Mute gesture demo
└── 3.gif # Full feature demo
| Problem | Solution |
|---|---|
| Webcam not detected | Close other apps using the camera (Teams, Zoom, etc.) |
| Hand not recognized | Improve lighting or move closer to camera |
| Volume too sensitive | The app has built-in smoothing—try slower movements |
| App crashes on start | Make sure all dependencies are installed correctly |
Got ideas? Found a bug? Contributions are welcome!
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Younes Barkat
- GitHub: @Younes-Barkat
- Links: linktr.ee/Younes_Barkat
⭐ If you found this useful, give it a star! ⭐
Made with ❤️ and Python


