Skip to content

🏠 Cloud-integrated IoT solution for smart room automation using MediaPipe gesture recognition and voice commands with Azure IoT Hub, achieving 95% gesture accuracy and <1s latency

Notifications You must be signed in to change notification settings

bbhargavpanchal/smart-room-gesture-voice-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 Smart Room Multimodal Control System

A cloud-integrated IoT solution for smart room automation using computer vision gesture recognition and voice commands, leveraging Azure IoT Hub, Raspberry Pi 4, and Arduino UNO for real-time appliance control.

πŸ“Š System Performance

Metric Measured Value Conditions
Gesture Recognition Accuracy 95% Well-lit environment (400–500 lux)
82% Low-light conditions
Voice Recognition Accuracy 91% Quiet room, single speaker
80% Moderate noise environment
End-to-End Latency ~0.8 seconds Complete command execution cycle
System Uptime 5+ hours Continuous operation without crashes
False Positives (Voice) 2–3% Due to accidental wake-word triggers
False Negatives (Gesture) 5–10% In low-light conditions

Demo⬇️ :

Demo.mp4

✨ Key Features

πŸ–οΈ Gesture Control System

  • MediaPipe-based hand tracking with 21 3D landmarks detection

  • Real-time gesture classification at 15+ FPS

  • Finger counting algorithm for command mapping:

    1 finger β†’ Turn ON Fan
    2 fingers β†’ Turn OFF Fan
    3 fingers β†’ Turn ON Light
    4 fingers β†’ Turn OFF Light
    

🎀 Voice Command System

Two-phase recognition: Wake-word activation + Command detection
"Friday" wake-word for hands-free activation
8-second command window after activation
Multiple exception handling layers for robustness

☁️ Cloud Integration

Azure IoT Hub with MQTT protocol
TLS 1.2 encryption for secure communication
Symmetric key authentication
Unidirectional Cloud-to-Device (C2D) messaging

πŸ”Œ Edge Computing

Raspberry Pi 4 as IoT edge device
Arduino UNO for hardware control
UART communication at 9600 baud rate
Real-time proximity detection with ultrasonic sensor

πŸ—οΈ System Architecture

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚   Input Recognition     β”‚
  β”‚  (Laptop/Computer)      β”‚
  β”‚ β€’ MediaPipe Hands       β”‚
  β”‚ β€’ Speech Recognition    β”‚
  β”‚ β€’ Flask Web Server      β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚ MQTT over TLS 1.2
              β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚   Azure IoT Hub         β”‚
  β”‚ β€’ Device Management     β”‚
  β”‚ β€’ Message Routing       β”‚
  β”‚ β€’ Secure Communication  β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚ C2D Messages
              β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚   Raspberry Pi 4        β”‚
  β”‚ β€’ IoT Device Client     β”‚
  β”‚ β€’ Message Processing    β”‚
  β”‚ β€’ Serial Communication  β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚ UART (9600 baud)
              β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚   Arduino UNO           β”‚
  β”‚ β€’ Command Parsing       β”‚
  β”‚ β€’ Relay Control         β”‚
  β”‚ β€’ Proximity Sensing     β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
              β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚   Physical Devices      β”‚
  β”‚ β€’ Fan (Relay Module)    β”‚
  β”‚ β€’ Light (Relay Module)  β”‚
  β”‚ β€’ Buzzer & LED          β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Hardware Requirements Core Components

Raspberry Pi 4 (3.3V logic)
Arduino UNO (5V logic)
USB Camera (minimum 640x480 resolution)
USB Microphone
Relay Module (with optocoupler isolation)
HC-SR04 Ultrasonic Sensor
Passive Buzzer
LED with current-limiting resistor
Common USB Hub (for stable power supply)

πŸ’» Software Stack Python Libraries

bash# Core Libraries
flask==2.3.2
opencv-python==4.8.0
numpy==1.24.3
mediapipe==0.10.3

# Azure IoT
azure-iot-device==2.12.0
azure-iot-hub==2.6.1

# Voice Recognition
SpeechRecognition==3.10.0
pyaudio==0.2.11

# Serial Communication
pyserial==3.5

System Requirement

  Python 3.7-3.10
  Arduino IDE 1.8+
  Azure subscription with IoT Hub
  PortAudio19 (for voice recognition)

πŸ‘¨β€πŸ’» Author

Bhargavkumar Panchal

GitHub: @bbhargavpanchal

LinkedIn: https://www.linkedin.com/in/bhargavpanchall/

πŸ“ž Support

Email: bhargavpanchal5151@gmail.com

⭐ If you find this project useful, please consider giving it a star!

About

🏠 Cloud-integrated IoT solution for smart room automation using MediaPipe gesture recognition and voice commands with Azure IoT Hub, achieving 95% gesture accuracy and <1s latency

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published