How aldhaf2007/voicebased-transport-system works
Voice Transport System is a Flask transport-search and booking application. A traveler submits typed or recorded speech; the server transcribes audio when needed, extracts and normalizes stations, searches the route graph, looks up schedules, and returns results for display or spoken summary. Users can authenticate, book or cancel trips, and review booking history; administrators manage stations, routes, and schedules. The sampled source shows the Flask/database boundary and browser behavior; some route wiring and database operations are described by the README rather than fully sampled.
Main entry points: app.py Flask request handlers · main.js Search and booking UI · database.py Booking and cancellation · admin.html Admin dashboard
Components 19
Browser experience
- Search and booking UI
static/js/main.js - Rendered pages
templates - Asset cache
static/service-worker.js
Route search
- Flask request handlers
app.py - Station extraction
app.py - Whisper transcription
app.py - Kokoro synthesis
app.py - Transport data access
database.py - Station and route graph
- Schedules and transport types
Accounts and bookings
- User authentication
database.py - Booking and cancellation
database.py - Users and bookings
- Local booking receipt
app.py
Network administration
- Admin dashboard
templates/admin.html - Network and schedule CRUD
database.py
Other components
- Traveler
- Whisper model
- Kokoro TTS
Connections 29
- Traveler → Search and booking UI: enters request
- Search and booking UI → Flask request handlers: sends search
- Search and booking UI → Flask request handlers: uploads audio
- Flask request handlers → Whisper transcription: transcribes audio
- Whisper transcription → Whisper model: runs model
- Flask request handlers → Station extraction: extracts stations
- Flask request handlers → Transport data access: queries routes
- Transport data access → Station and route graph: finds paths
- Transport data access → Schedules and transport types: reads schedules
- Flask request handlers → Search and booking UI: returns results
- Search and booking UI → Kokoro synthesis: requests summary
- Kokoro synthesis → Kokoro TTS: synthesizes speech
- Flask request handlers → Rendered pages: renders pages
- Search and booking UI → Flask request handlers: authenticates
- Flask request handlers → User authentication: checks credentials
- User authentication → Users and bookings: reads and writes users
- Search and booking UI → Flask request handlers: submits booking
- Flask request handlers → Booking and cancellation: creates booking
- Booking and cancellation → Schedules and transport types: locks and updates seats
- Booking and cancellation → Users and bookings: writes booking
- Flask request handlers → Local booking receipt: saves receipt
- Search and booking UI → Flask request handlers: requests history or cancellation
- Flask request handlers → Booking and cancellation: loads or cancels booking
- Traveler → Admin dashboard: manages network
- Admin dashboard → Flask request handlers: submits admin actions
- Flask request handlers → Network and schedule CRUD: dispatches CRUD
- Network and schedule CRUD → Station and route graph: updates stations and routes
- Network and schedule CRUD → Schedules and transport types: updates schedules
- Search and booking UI → Asset cache: uses cached assets