How amitabhchondar-ux/asva works
ASVA is a private, offline voice-control system: an ESP32-S3 recognizes a wake word and fixed commands locally, controls an actuator, and reports event metadata to a local hub. The hub manages MQTT devices, persists telemetry and events, exposes authenticated REST and WebSocket interfaces, and serves a browser dashboard for live monitoring, history, commands, and evaluation. A simulator supports trying the platform without hardware; ML scripts prepare data, train, and evaluate models. The README documents these product flows; some route and page implementations were not sampled, so their internal links are not inferred.
Main entry points: api.ts Browser API client · server.ts Hub server · routes REST routes · voice_engine.cpp Voice recognition
Components 26
On-device voice control
- ESP32-S3
firmware/main/app_main.cpp - Audio capture
firmware/main/audio_i2s.cpp - Voice recognition
firmware/main/voice_engine.cpp - Local actuator
firmware/main/actuator.cpp - Wi-Fi link
firmware/main/wifi_manager.cpp - Device MQTT link
firmware/main/mqtt_link.cpp
Hub services
- Hub server
hub/server/src/server.ts - Embedded MQTT broker
hub/server/src/mqtt/broker.ts - Hub MQTT client
hub/server/src/mqtt/client.ts - REST routes
hub/server/src/routes - Authentication and roles
hub/server/src/auth/guard.ts - Live WebSocket feed
hub/server/src/ws/wsHandler.ts - SQLite records
hub/server/src/db/db.ts
Dashboard tools
- 3D bookshelf
hub/web/src/shaders/landing-pages/LandingPages.tsx - Browser API client
hub/web/src/lib/api.ts - Live device view
hub/web/src/pages/Dashboard.tsx - Event ledger
hub/web/src/pages/History.tsx - Command controls
hub/web/src/pages/Commands.tsx - Evaluation lab
hub/web/src/pages/Evaluation.tsx
Model workflow
- Data preparation
ml/prepare_data.py - Model training
ml/train.py - Model evaluation
ml/evaluate.py
Hardware simulation
- Virtual ESP32
hub/simulator/src/simulator.ts
Other components
- User
- Browser
- I²S microphone
Connections 28
- User → I²S microphone: speaks commands
README.md - I²S microphone → Audio capture: provides audio
README.md - Audio capture → Voice recognition: feeds audio
firmware/main/voice_engine.cpp - Voice recognition → Local actuator: triggers locally
README.md - Voice recognition → Device MQTT link: reports events
README.md - Wi-Fi link → Device MQTT link: enables network
README.md - Device MQTT link → Embedded MQTT broker: publishes metadata
README.md - Hub server → Embedded MQTT broker: starts broker
hub/server/src/server.ts - Hub server → Hub MQTT client: initializes client
hub/server/src/server.ts - Hub MQTT client → SQLite records: stores device data
hub/server/src/mqtt/client.ts - Hub MQTT client → Live WebSocket feed: broadcasts updates
hub/server/src/mqtt/client.ts - Hub server → Live WebSocket feed: registers clients
hub/server/src/server.ts - Hub server → REST routes: registers routes
hub/server/src/server.ts - REST routes → SQLite records: reads and writes
hub/server/src/routes/sessions.ts - REST routes → Authentication and roles: checks roles
hub/server/src/routes/sessions.ts - Authentication and roles → SQLite records: checks accounts
hub/server/src/auth/guard.ts - User → Browser: uses dashboard
README.md - Browser → 3D bookshelf: opens interface
- Live device view → Browser API client: requests device data
- Event ledger → Browser API client: requests event history
hub/web/src/pages/History.tsx - Evaluation lab → Browser API client: requests session metrics
hub/web/src/pages/Evaluation.tsx - Command controls → Browser API client: sends commands
- Browser API client → REST routes: calls REST API
README.md - Live WebSocket feed → Live device view: streams live updates
- User → Virtual ESP32: tries without hardware
README.md - Virtual ESP32 → Embedded MQTT broker: simulates device link
- Data preparation → Model training: prepares training data
- Model training → Model evaluation: evaluates trained model