hacky1997
voice-based-email-for-blind
Python

Emailing System for visually impaired persons

Last updated Mar 26, 2026
68
Stars
53
Forks
9
Issues
0
Stars/day
Attention Score
38
Language breakdown
Python 54.1%
Shell 25.4%
Makefile 16.4%
Dockerfile 4.1%
โ–ธ Files click to expand
README

๐ŸŽ™ Voice Email

A voice-controlled email client for everyone โ€” accessible, modern, and runs on any device.

Python Flask PWA License: MIT


What's New in v2

| 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 โœ… |


Features

  • 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

Architecture

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)

Setup

1. Clone & Install

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.txt

2. Configure .env

cp .env.example .env

Edit .env with your credentials

3. Provider-specific setup

Gmail (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/callback as a redirect URI
  • Copy Client ID and Secret into .env

Yahoo Mail

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.

4. Run

# Desktop only
python app.py

LAN access (required for mobile PWA)

python app.py --host 0.0.0.0

Then open http://localhost:5000 in your browser.


Mobile / Phone Access

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>:5000 in 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.

Voice Commands

| 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 |


Project Structure

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)

Contributing

Issues and PRs are welcome. Please read CONTRIBUTING.md first.

License

MIT ยฉ Sayak Naskar

ยฉ 2026 GitRepoTrend ยท hacky1997/voice-based-email-for-blind ยท Updated daily from GitHub