A voice-controlled email client for everyone β accessible, modern, and runs on any device.
| Feature | v1 (2019) | v2 (Now) |
|---|---|---|
| Auth | Plain password in source code β | OAuth2 (Gmail) + App Passwords β |
| Audio | pyglet + temp MP3 files | Web Speech API (no files) β |
| Email API | Gmail SMTP (broken since 2024) | Gmail REST API + generic IMAP β |
| Mobile | None | Full PWA β install on any phone β |
| Features | Send, read | Send, read, reply, delete, mark as read, contact book β |
| Structure | Single flat script | Modular packages + REST API β |
- Send email by voice or keyboard
- Read inbox aloud with text-to-speech
- Reply to emails by voice
- Delete / Mark as read any email
- Contact book with voice-search autocomplete
- Works on any phone β installable PWA (no app store needed)
- Providers: Gmail (OAuth2), Yahoo Mail, any IMAP/SMTP server
Flask Backend (Python) PWA Frontend (Browser)
β β
βββ auth/gmail_oauth.py βββ Web Speech API (STT)
βββ auth/imap_auth.py βββ SpeechSynthesis (TTS)
βββ email_client/reader.py βββ Service Worker (offline)
βββ email_client/sender.py βββ Installable manifest
βββ email_client/contacts.py
βββ app.py (REST API + serve PWA)
git clone https://github.com/hacky1997/voice-based-email-for-blind.git
cd voice-based-email-for-blind
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtcp .env.example .env
# Edit .env with your credentialsGmail (OAuth2)
- Go to Google Cloud Console
- Create a project β Enable Gmail API
- Create OAuth 2.0 credentials (Web Application)
- Add
http://localhost:5000/api/auth/gmail/callbackas a redirect URI - Copy Client ID and Secret into
.env
Yahoo Mail
- Go to Yahoo Account Security
- Generate an App Password
- Use that (not your main password) when signing in
Generic IMAP
Enter your IMAP/SMTP host and port in the "Advanced" section of the login screen. Make sure IMAP is enabled in your email provider's settings.
# Desktop only
python app.py
# LAN access (required for mobile PWA)
python app.py --host 0.0.0.0Then open http://localhost:5000 in your browser.
Since this is a Progressive Web App (PWA):
- Start the server with
--host 0.0.0.0 - Find your computer's local IP:
ip addr(Linux) /ipconfig(Windows) - Open
http://<your-local-ip>:5000in Chrome or Safari on your phone - Tap "Add to Home Screen" to install it like an app
Note: Web Speech API requires HTTPS on mobile (except localhost). For production deployment, use a service like Railway or Fly.io which provide free HTTPS.
| Say⦠| Action |
|---|---|
| "Open inbox" | Load your inbox |
| "Read email" | Open the latest email |
| "Read aloud" | Speak the open email |
| "Next email" | Navigate to next |
| "Reply" | Reply to open email |
| "Delete" | Trash open email |
| "Mark as read" | Mark open email read |
| "Compose email" | Open compose screen |
| "Contacts" | Open contact book |
| "Sign out" | Disconnect |
voice-email/
βββ app.py # Flask app, REST API, serves PWA
βββ config.py # Environment config
βββ requirements.txt
βββ .env.example
βββ auth/
β βββ gmail_oauth.py # Gmail OAuth2 flow
β βββ imap_auth.py # Generic IMAP/SMTP (Yahoo etc.)
βββ email_client/
β βββ reader.py # List, fetch, delete, mark as read
β βββ sender.py # Send, reply
β βββ contacts.py # JSON contact book
βββ static/ # PWA files (served by Flask)
βββ index.html # Full single-page app
βββ manifest.json # PWA manifest (installable)
βββ sw.js # Service worker (offline)
Issues and PRs are welcome. Please read CONTRIBUTING.md first.
MIT Β© Sayak Naskar