Project · Computer vision and interaction

Desktop Controller | Webcam Gesture and Voice Control

A Python desktop application that maps webcam hand gestures and microphone speech to computer interaction, with an optional mobile touchpad mode.

Desktop Controller project preview
Desktop Controller project preview.
On this page
  1. Problem statement
  2. Proposed solution
  3. Gesture controller
  4. Voice input
  5. Mobile touchpad mode
  6. Demo video
  7. Technology stack
  8. Requirements and setup
  9. Project outcome

Desktop Controller is a Python application for interacting with a computer through webcam-tracked hand gestures and voice input. It also includes a mobile touchpad mode for cursor movement and left-click control over a shared local network.

Problem statement

Desktop interaction usually depends on a physical mouse and keyboard. Touchscreens can offer another input method, but are not standard on many desktop systems. The project explores webcam-based computer vision and microphone input as alternative ways to interact with a desktop.

Proposed solution

The application combines two interaction modes in a desktop interface:

  • Virtual Controller: track hand landmarks from a webcam and map recognized gestures to cursor and system actions.
  • Mobile Controller: start a local touchpad server and connect a mobile browser on the same network for cursor movement and left-click.
  • Voice input: use a microphone speech recognizer to enter recognized speech as text.

Gesture controller

The webcam stream is processed to detect hand landmarks. The controller derives finger states and gesture classes from landmark positions, then maps selected gestures to mouse and system operations.

  1. 01
    Capture webcam frames

    Read frames and prepare them for hand tracking.

    OpenCV
  2. 02
    Detect hand landmarks

    Track hands and landmark positions in each frame.

    MediaPipe Hands
  3. 03
    Classify gestures

    Use finger states and landmark distances to recognize gestures.

    Python
  4. 04
    Map gestures to actions

    Move the pointer, click, drag, scroll, or adjust supported settings.

    PyAutoGUI
Fig. 1 · Webcam-to-desktop interaction pipeline, summarized from the repository implementation.

Gesture and action examples

Gesture inputDocumented action
Two-finger V gestureMove the cursor.
FistHold the left mouse button while moving, for drag interactions.
Middle-finger gestureLeft-click after the controller's V-gesture state.
Index-finger gestureRight-click after the controller's V-gesture state.
Closed two-finger gestureDouble-click after the controller's V-gesture state.
Pinch gesturesUse the dominant hand for brightness and volume; use the other hand for vertical and horizontal scrolling.

Voice input

The desktop interface includes a microphone control. Speech is recognized using the configured Google speech-recognition service, and recognized text is typed into the active desktop context. A stop control is available to end the running controller process.

Mobile touchpad mode

The optional mobile mode starts a local Flask-SocketIO server and displays its network address as a QR code. A phone browser on the same network can send cursor movement, scrolling, and mouse-button events to the desktop. The repository describes this mode as supporting cursor movement and left-click; it is separate from webcam hand tracking.

Demo video

Load the project demonstration in the player below.

Technology stack

Tools and libraries identified in the project source and requirements include:

Language

  • Python

Computer Vision

  • OpenCV
  • MediaPipe Hands

Desktop Interaction

  • PyAutoGUI
  • screen_brightness_control
  • PyCAW

Speech Input

  • SpeechRecognition
  • PyAudio / sounddevice

Desktop Interface

  • Tkinter
  • Pillow

Mobile Touchpad

  • Flask
  • Flask-SocketIO
  • gevent

Libraries are listed according to their roles in the public project repository.

Requirements and setup

The repository documents Python 3.8 or later, a webcam, and a microphone for the desktop application. Its README recommends creating a virtual environment, installing the repository's requirements, and running python main.py. The documented platform requirement is Windows 8 or later; the mobile controller connects over the local network.

Project outcome

Desktop Controller brings webcam gesture tracking, speech-to-text input, and a companion mobile touchpad into one desktop project. The source repository includes examples for right-click, double-click, multiple selection, and brightness control. No performance measurements are claimed on this page.

A webcam and a few tracked gestures become another way to move, click, scroll, and control the desktop.
All projects View source Get in touch