How b25cs1051-kush/assembly_ai_hackathon works
VoiceCart AI is a voice-controlled shopping storefront. A shopper speaks to the browser agent, which calls client-side tools to search and show products, compare options, answer from catalog reviews, update the cart, and conduct a confirmation-based checkout; the page reflects those actions. The browser streams audio directly to AssemblyAI, while the FastAPI server supplies catalog data and mints temporary voice tokens. Visit memory and cart behavior are client-side. The graph follows the README and sampled sources; unsampled tool handlers and UI wiring are represented only where documented, without inferring their internal calls.
Main entry points: main.py Store API · voice_agent.js Voice session · app.js Storefront state · product_service.py Product queries
Components 13
Shopping browser
- Storefront state
frontend/js/app.js - Page renderer
frontend/js/ui_renderer.js - Voice session
frontend/js/voice_agent.js - Shopping tools
frontend/js/agent_tools.js - Mic processing
frontend/js/mic_worklet.js - Audio playback
frontend/js/playback_worklet.js - Voice acknowledgements
frontend/audio/acks.json
Catalog server
- Store API
backend/main.py - Runtime settings
backend/config.py
Product catalog
- Product queries
backend/services/product_service.py - Product dataset
data/products.json
Voice service
- AssemblyAI agent
Other components
- Shopper
Connections 20
- Shopper → Storefront state: browses
- Shopper → Voice session: speaks
- Storefront state → Store API: requests catalog
- Store API → Product queries: queries
- Product queries → Product dataset: reads
- Product queries → Store API: returns products
- Store API → Storefront state: returns catalog
- Storefront state → Page renderer: renders state
- Shopping tools → Storefront state: changes shopping state
- Storefront state → Store API: requests comparison
- Store API → Product queries: builds comparison
- Voice session → Shopping tools: dispatches calls
- Voice session → Store API: requests token
- Store API → Runtime settings: reads credentials
- Store API → AssemblyAI agent: mints token
- Voice session → AssemblyAI agent: streams mic audio
- AssemblyAI agent → Voice session: sends events and audio
- Voice session → Mic processing: processes microphone
- Voice session → Audio playback: queues reply audio
- Voice session → Voice acknowledgements: loads clips