Skip to content

DamsaraJayanath/AI-Based_Presentation_Control_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎤🖐️ AI-Based Presentation Control System

This project is an intelligent presentation controller built using Python, MediaPipe, Scikit-learn, and SpeechRecognition. It allows users to control slide presentations using either hand gestures or voice commands — offering a touch-free and smooth experience during talks or lectures.

🧠 Key Features

  • Dual Control Modes: Use either hand gestures or voice commands to navigate slides.
  • Hand Gesture Control: Trained a Random Forest classifier on custom hand gesture dataset using MediaPipe landmarks.
  • Voice Command Control: Uses Google's Speech Recognition API to interpret "next" and "previous" slide commands.
  • Real-time Feedback: Displays live webcam feed with hand detection, gesture prediction, and confidence levels.

📂 File Structure

  • Model.ipynb – Jupyter notebook used to extract MediaPipe hand landmarks and train a gesture recognition model using Random Forest.
  • gesture_model.pkl – Saved trained model (exported via Joblib).
  • presentation_control.py – Main script to run either hand gesture or voice command mode for controlling slides.

🖐️ Hand Gesture Mode

  1. Detects hand landmarks using MediaPipe.
  2. Extracts (x, y) positions of 21 landmarks and classifies the gesture using a Random Forest model.
  3. If "next" gesture is detected with high confidence for a duration, it sends a (next slide).
  4. If "previous" gesture is detected, it sends a (previous slide).

🎙️ Voice Command Mode

  1. Listens to your microphone using the SpeechRecognition library.
  2. Recognizes voice commands like "next" or "previous".
  3. Triggers respective key presses to control the slides.

▶️ How to Run

python Final.py

Then, input either 0 (hand gesture mode) or 1 (voice command mode) when prompted.

🛠 Requirements

  • Python 3.x
  • Webcam and/or microphone
  • Python libraries:
    • opencv-python
    • mediapipe
    • numpy
    • scikit-learn
    • joblib
    • pyautogui
    • speechrecognition

📦 Install Dependencies

pip install opencv-python mediapipe numpy scikit-learn joblib pyautogui SpeechRecognition 

📁 Dataset

The dataset for training gestures was created manually using MediaPipe landmarks extracted from the webcam feed. The trained model is included as gesture_model.pkl.

📌 Applications

  • Presentations in classrooms or meetings
  • Touch-free navigation during webinars or live demos
  • Assistive technology for hands-free interaction

💡 Future Enhancements

  • Support for more gestures (e.g., start/pause slideshow)
  • Improved voice intent recognition (e.g., "go back one slide")
  • GUI interface for better usability

💡 Tip

You can use your own hand gesture dataset to personalize this system. Make sure to capture two clear hand gestures—one for "next" and one for "previous". Once your data is ready, run the Model.ipynb notebook with your dataset to train and export a new model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published