How abbiereid/star works
Project type and purpose
• Star is a Python-based, monolithic “home assistant” application that translates British Sign Language (ASL) gestures into speech and on-screen text. It targets non-verbal users (deaf community) by combining wake-word detection, gesture recognition, text-to-speech, and a simple UI.
File structure
• Top level
• main.py: application entry point / orchestrator
• dockerfile, setup.py, requirements.txt: containerization & packaging
• assets/: static images (logo)
• README.md
• models/
• assistant.py: high-level controller for models
• wake_word_model.py: hot-word detection
• sign_language_recognition.py / gesture_recognizer.task / model*.h5 / model6.keras: ASL ML models
• slr_utils/: preprocessing & landmark extraction, recognition logic
• utils/
• camera.py: video capture module
• observer.py: Observer pattern implementation for events
• ui.py: display & GUI management
• textTospeech.py: TTS engine wrapper
• weather.py: optional weather‐info service
• tests/: unit tests for main app and models
Key insights from README
• “Star is a home assistant for non-verbal people… focuses on BSL.”
1. Input Layer
• Camera Module (utils/camera.py)
• Wake-word Detector (models/wake_word_model.py)
2. Processing Layer
• Gesture Recognition Engine
– Preprocessor & Landmark Extractor (models/slr_utils)
– ML Model(s) (models/model.h5, model6.keras)
• Command/Intent Manager (models/assistant.py)
• Observer/Event Bus (utils/observer.py)
3. Output Layer
• Text-to-Speech Service (utils/textTospeech.py)
• UI Renderer (utils/ui.py)
• External Info Service (utils/weather.py)
4. Persistence & Config (if any)
• Local model files (models/*.h5)
• config (could be in setup.py or environment)
5. Orchestration
• main.py drives initialization, component wiring, event loop
1. Camera → Frame Buffer → Wake-word Detector → (on “wake” event) → Gesture Recognition
2. Frames → Preprocessor → ML Model → “recognized sign” event → Intent Manager
3. Intent Manager → Observer Bus → Subscribers:
• TTS Service → Audio Output
• Weather Service (optional) → UI
4. main.py wires services: instantiates modules, registers observers, enters processing loop
c. Architectural patterns & design principles:
• Observer Pattern: utils/observer.py decouples producers (recognizer, intent manager) from consumers (UI, TTS).
• Modular Separation: clear Input → Processing → Output layers.
• Single Responsibility: each utils/ and models/ module has one purpose.
• Dependency Injection: main.py passes module instances to one another.
d. Technologies & libraries:
• Python 3.x
• TensorFlow / Keras (models/*.h5, model6.keras)
• OpenCV (in utils/camera.py)
• Pyttsx3 or gTTS (in utils/textTospeech.py)
• Docker (dockerfile) for containerization
• pytest (tests/)
Final advice
• Be exhaustive: include every sub-module that plays a role in the runtime.
• Observer pattern explicitly: show Event Bus in the center with spokes to subscribers.
• Don’t overthink—map each top-level directory to a logical subsystem, show how they connect under main.py’s orchestration.