How nsp909/img2brl works
Braille Pin Visualizer turns camera, microphone, ASL, or typed input into prioritized messages, encodes them as six-dot braille, streams cells for playback, and sends pin masks to the Pi actuator. The browser app also exposes recognition controls and status through the laptop bridge. The README documents the camera/object/text and sound stages; source excerpts confirm UI orchestration and client seams, but not the bridge’s internal detection calls, so those relationships are documented with README evidence. ASL modules are shown as a distinct documented capability; their precise runtime wiring is not expanded beyond supported references.
Main entry points: App.tsx App orchestration · detect_bridge.py Priority queue and controls · bridge.ts Bridge API client · models Object detection
Components 20
Recognition inputs
- Pi camera stream
- Microphone speech
Laptop bridge
- Object detection
pi/models - Text gate and reader
bridge/detect_bridge.py - Name-matched speech
bridge/sound_mode.py - ASL recognition
bridge/asl_mode.py - Priority queue and controls
bridge/detect_bridge.py
Braille app
- Bridge API client
src/lib/bridge.ts - Bridge state hook
src/hooks/useBridge.ts - App orchestration
src/App.tsx - Detection model
src/lib/detections.ts - Braille encoder
src/lib/braille.ts - Timed cell stream
src/hooks/useCellStream.ts - Playback and lab UI
src/components/DevView.tsx - Hardware client hook
src/hooks/useHardware.ts - Pin transport
src/lib/hardware.ts
Pi actuator
- Pi solenoid server
pi/solenoid_server.py - Pi braille playback
pi/braille_play.py - Pi braille encoding
pi/braille.py
Other components
- Wearer
Connections 22
- Pi camera stream → Object detection: supplies frames
README.md - Pi camera stream → Text gate and reader: supplies frames
README.md - Microphone speech → Name-matched speech: transcribes utterances
README.md - Object detection → Priority queue and controls: queues candidates
README.md - Text gate and reader → Priority queue and controls: queues text
README.md - Name-matched speech → Priority queue and controls: queues matches
README.md - Wearer → App orchestration: types or controls
README.md - App orchestration → Bridge state hook: reads bridge state
src/App.tsx - Bridge state hook → Bridge API client: calls API
src/hooks/useBridge.ts - Bridge API client → Priority queue and controls: requests queue actions
src/lib/bridge.ts - Priority queue and controls → Bridge API client: returns detections
README.md - App orchestration → Detection model: creates detections
src/App.tsx - App orchestration → Braille encoder: encodes label
src/App.tsx - App orchestration → Timed cell stream: plays encoded cells
src/App.tsx - App orchestration → Hardware client hook: sends current cell
src/App.tsx - App orchestration → Playback and lab UI: renders controls
src/App.tsx - Hardware client hook → Pin transport: calls pin API
src/hooks/useHardware.ts - Pin transport → Pi solenoid server: sends pin frames
README.md - Pi solenoid server → Pi braille encoding: uses braille mapping
pi/solenoid_server.py - Wearer → Pi camera stream: presents scene
- ASL recognition → Priority queue and controls: provides sign input
bridge/detect_bridge.py - Wearer → Microphone speech: speaks name