How alok-yadav25/voice-assistant works
This is a local web-based voice assistant: a user enters or speaks a command in the browser, the frontend sends it to Flask, and the backend dispatches supported requests and returns text for display while speaking responses locally. The README describes typed and optional spoken input, offline text-to-speech, and simple commands; the excerpts also show weather, search, volume, screenshot, news, and calculation features. Some backend branches are omitted, so uncertain integrations are shown only as unverified.
Main entry points: script.js UI interactions · app.py Command dispatch · index.html Assistant page · style.css Page styling
Components 16
Browser interface
- Assistant page
templates/index.html - UI interactions
static/js/script.js - Command history
static/js/script.js - Page styling
static/css/style.css
Assistant backend
- Flask routes
app.py - Command dispatch
app.py - Command responses
app.py - Speech output
app.py
Local and external capabilities
- Weather lookup
app.py - Web search
app.py - System actions
app.py - Browser speech recognition
Other components
- User
- Weather service
- Local browser and OS
- pyttsx3 engine
Connections 18
- User → Assistant page: uses
README.md - Assistant page → UI interactions: loads interactions
- UI interactions → Flask routes: POSTs command
static/js/script.js - Flask routes → Assistant page: renders
app.py - UI interactions → Command history: stores history
static/js/script.js - UI interactions → Browser speech recognition: starts recognition
static/js/script.js - Browser speech recognition → UI interactions: supplies transcript
static/js/script.js - UI interactions → Page styling: uses styles
- Flask routes → Command dispatch: routes command
app.py - Command dispatch → Command responses: selects response
app.py - Command dispatch → Weather lookup: calls weather lookup
app.py - Weather lookup → Weather service: requests weather
app.py - Command dispatch → Web search: handles search
app.py - Command dispatch → System actions: handles actions
app.py - Command dispatch → Speech output: speaks responses
app.py - Speech output → pyttsx3 engine: generates speech
app.py - System actions → Local browser and OS: opens sites or adjusts system
app.py - Command responses → UI interactions: returns JSON
static/js/script.js