How rishi18360/echo works
Purpose and Entry Points
ECHO is a Python 3.10 webcam-driven, single-hand gesture application. It recognizes raised-finger counts to select an interaction mode, then delegates gesture handling to that mode. The runtime entry point is main.py; GUI/display integration is likely separated in app_gui.py.
Application Orchestration
main.py is the top-level control loop: initialize camera/gesture processing, detect a mode-selection gesture, and run the active mode until switching or exit. It is the primary boundary between shared recognition/input infrastructure and mode-specific behavior.
• main.py
• app_gui.py
Gesture-Based Mode Selection
The initial routing mechanism maps finger counts to four domains: one finger for assistive, two for presentation, three for communication, and four for entertainment. Recognition is constrained to one hand and depends on webcam lighting/input quality. Keyboard input currently controls mode switching, making keyboard events a parallel control path to gestures.
• main.py
• modes/__init__.py
Mode Package Boundary
The modes package isolates user-facing capabilities from the main runtime. Each module should own its gesture interpretation, on-screen instructions, and action execution after activation. This modular split allows modes to evolve without changing the mode-selection loop.
• modes/__init__.py
• modes/assistive.py
• modes/presentation.py
Assistive and Communication Domains
Assistive behavior is implemented independently from communication behavior, indicating separate action vocabularies and potentially different downstream OS or messaging interactions. These are invoked only after the shared selector has chosen their mode.
• modes/assistive.py
• modes/communication.py
Presentation and Entertainment Domains
Presentation mode handles gesture-controlled presentation interactions, while entertainment mode contains leisure/media-oriented interactions. Both consume the same high-level webcam/gesture session but remain isolated modules.
• modes/presentation.py
• modes/entertainment.py
Runtime and Dependencies
The application is a local Python desktop process, launched with python main.py and tested against Python 3.10.x. Required computer-vision, GUI, and any device/action libraries are declared centrally in requirements.txt. Its key external boundary is the local webcam; on-screen feedback is part of the local GUI path rather than a web or server deployment.
• requirements.txt
• main.py
• app_gui.py
Main entry points: __init__.py Mode Interface · main.py Control Loop · app_gui.py Display Feedback · assistive.py Assistive Mode
Components 11
Desktop Runtime
- Dependencies · CV, GUI, and device/action libraries.
requirements.txt - Control Loop · Initializes input, selects modes, and manages switching or exit.
main.py - Local Webcam · Single-hand gesture input; sensitive to lighting and camera quality.
- Finger Count Selector · Maps one through four raised fingers to active modes.
main.py - Keyboard Controls · Controls mode switching alongside gestures.
main.py - Display Feedback · Provides local on-screen feedback and instructions.
app_gui.py
Interaction Modes
- Mode Interface · Boundary between selection and mode-specific gesture behavior.
modes/__init__.py - Assistive Mode · Handles assistive action gestures.
modes/assistive.py - Presentation Mode · Handles presentation-control gestures.
modes/presentation.py - Communication Mode · Handles communication-specific gestures.
modes/communication.py - Entertainment Mode · Handles leisure or media gestures.
modes/entertainment.py
Connections 14
- Dependencies → Control Loop: provides runtime libraries
- Local Webcam → Control Loop: video input
- Control Loop → Finger Count Selector: detects raised fingers
- Keyboard Controls → Control Loop: switch or exit events
- Control Loop → Display Feedback: renders feedback
- Finger Count Selector → Mode Interface: activates selected mode
- Mode Interface → Assistive Mode: 1 finger
- Mode Interface → Presentation Mode: 2 fingers
- Mode Interface → Communication Mode: 3 fingers
- Mode Interface → Entertainment Mode: 4 fingers
- Assistive Mode → Display Feedback: instructions and feedback
- Presentation Mode → Display Feedback: instructions and feedback
- Communication Mode → Display Feedback: instructions and feedback
- Entertainment Mode → Display Feedback: instructions and feedback