VANI is a cross-platform accessibility platform for Indian Sign Language (ISL).
It combines:
- a Flutter client app (Web, Android, iOS, Desktop targets)
- a FastAPI + YOLO inference backend over WebSocket
The system is designed for real-time sign-to-text assistance, two-way communication, emergency workflows, and multilingual UI support.
- Overview
- Core Features
- Architecture
- Repository Structure
- Tech Stack
- Prerequisites
- Local Development Setup
- Runtime Configuration
- API Contract
- Deployment Guide
- Model Management
- Localization
- Emergency Module Details
- Build and Release Commands
- Troubleshooting
- Current Status
VANI focuses on practical communication support for Deaf and Hard-of-Hearing users in India.
Key runtime flow:
- Flutter client captures camera frames.
- Client sends frames (base64) through WebSocket to backend
/ws. - Backend runs YOLO inference on each frame.
- Backend returns prediction payloads with label + confidence.
- Client displays real-time results and builds usable sentence output.
- Real-time ISL sign recognition and sentence support
- Two-way communication screen for Deaf/hearing interaction
- Emergency SOS workflow with:
- local emergency contacts (Hive)
- optional location embedding
- mobile shake trigger
- SMS launch via
url_launcher
- ISL signs reference screen
- Detailed objective pages (Accessibility, Bridging, Inclusivity, Privacy, Offline, Education)
- Language switching (English, Hindi, Marathi)
- Light/dark theming
- Main app entry:
lib/main.dart - Primary screens:
lib/screens/TranslateScreen.dartlib/screens/TwoWayScreen.dartlib/screens/EmergencyScreen.dartlib/screens/EmergencySetupScreen.dartlib/screens/Signspage.dartlib/screens/HomeScreen.dart
- Localization source:
lib/l10n/AppLocalizations.dart - Emergency services:
lib/services/EmergencyService.dartlib/services/LocationService.dart
- Backend entry:
isl_backend/app.py - Health endpoint:
GET /health - Inference socket:
WS /ws - Model path:
isl_backend/model/isl_best.pt
- Client uses secure WebSocket (
wss://) to Railway host. - Current host is hardcoded in:
lib/screens/TranslateScreen.dartlib/screens/TwoWayScreen.dart
vani/
lib/
components/
l10n/
models/
screens/
objectives/
services/
utils/
main.dart
isl_backend/
app.py
Dockerfile
railway.json
requirements.txt
model/
isl_best.pt
android/
ios/
web/
windows/
linux/
macos/
pubspec.yaml
README.md
- Flutter SDK (Dart 3.11)
cameraweb_socket_channelhttpflutter_ttshive+hive_fluttergeolocatorurl_launchershakevibrationspeech_to_text
- Python 3.10
- FastAPI
- Uvicorn
- Ultralytics YOLO
- PyTorch CPU
- OpenCV (headless)
- gdown
Install before setup:
- Flutter SDK (stable channel)
- Python 3.10+
- Git
- Git LFS (recommended for large model file workflows)
Quick checks:
flutter --version
python --version
git --version
git lfs versiongit clone https://github.com/VisheshKamble/ISL.git
cd ISLOption A: Pull model via Git LFS (recommended)
git lfs install
git lfs pullOption B: Let backend auto-download model from Google Drive
- If
isl_backend/model/isl_best.ptis missing, backend downloads it at startup.
cd isl_backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python app.pyBackend defaults:
- host:
0.0.0.0 - port:
8000(orPORTenv variable if present)
Open a second terminal at repo root:
cd ..
flutter pub get
flutter run -d chromeExamples:
flutter run -d emulator-5554
flutter run -d windowsWebSocket settings are read from --dart-define values or the .env.* files:
ISL_WS_ENABLEDISL_WS_URLISL_WS_SCHEMEISL_WS_HOSTVANI_CORS_ORIGINSfor backend CORS allow-list, comma-separatedVANI_CORS_ORIGIN_REGEXas a fallback allow pattern for local dev and Railway web deploysISL_API_BASE_URLoptional HTTP/HTTPS API base for general SOS backend callsISL_API_MOBILE_BASE_URLoptional mobile-only API base override (LAN/dev)
- Flutter analyzer and tests are covered by CI in
.github/workflows/ci.yml - WebSocket URL routing is centralized in
lib/services/backend_config.dart - Backend CORS is no longer wide open by default; production origins should be supplied through environment variables
ISL_WS_PATH
Recommended files:
.env.local->ws://127.0.0.1:8000/ws.env.prod->wss://isl-production-57d4.up.railway.app/ws
Example run commands:
flutter run --dart-define-from-file=.env.local
flutter run --dart-define-from-file=.env.prodResponse shape:
{
"status": "online",
"model_loaded": true,
"engine": "YOLOv11-CPU"
}Input messages:
- base64 image frame string (optionally with
data:image/...;base64,prefix) - control messages:
__PING____STOP__
Output messages:
Prediction:
{
"type": "prediction",
"label": "hello",
"confidence": 0.92,
"frame": 118
}Protocol keepalive:
{"type": "ping"}
{"type": "pong"}Error example:
{"type": "error", "message": "Model not available on server"}Backend already includes:
isl_backend/Dockerfileisl_backend/railway.json
Docker startup command:
uvicorn app:app --host 0.0.0.0 --port ${PORT:-8000}Recommended Railway settings:
- Root directory:
isl_backend - Builder: Dockerfile
- Health check path:
/health - Restart on failure: enabled
Post-deploy checks:
- Open
https://<your-domain>/health - Confirm
model_loadedis true - Validate WebSocket from app (
wss://<your-domain>/ws)
Build web bundle:
flutter build web --releaseOutput:
build/web/
Deploy build/web/ to your static hosting target (Netlify, Vercel, Firebase Hosting, Cloudflare Pages, S3+CDN, etc.).
Important:
- Keep backend on HTTPS and WebSocket on WSS for browser compatibility.
Primary model file:
isl_backend/model/isl_best.pt
Current size in repository:
- 121,378,638 bytes (about 121 MB)
Notes:
- For GitHub, large model files should be tracked with Git LFS.
- Backend includes fallback auto-download via
gdownwhen model is missing.
Localization class:
lib/l10n/AppLocalizations.dart
Supported locales:
enhimr
Behavior:
t(key)first checks active locale.- Falls back to English.
- Asserts in debug if key is missing in all locales.
Storage:
- Hive box:
emergency_contacts - Max contacts: 5
Platform behavior:
- Shake trigger: mobile only
- SMS send path: mobile only
- GPS: mobile + web
Main emergency files:
lib/services/EmergencyService.dartlib/services/LocationService.dartlib/models/EmergencyContact.dart
flutter clean
flutter pub get
flutter analyze
flutter testRelease builds:
flutter build web --release
flutter build apk --release
flutter build appbundle --release
flutter build windows --releasecd isl_backend
pip install -r requirements.txt
python app.pyContainer build (optional local test):
cd isl_backend
docker build -t vani-backend .
docker run -p 8000:8000 vani-backend- Verify backend is running and reachable.
- Confirm client host in
_kRailwayHostis correct in both screen files. - Ensure endpoint is WSS in production.
- Check browser console/network for blocked mixed-content errors.
- Confirm
isl_backend/model/isl_best.ptexists. - If missing, allow startup download via
gdown. - Verify outbound internet access on deployment runtime.
- Backend currently runs CPU inference.
- Scale instance size or optimize model variant for production load.
- Tune frame interval in client (
_kFrameIntervalMs).
- On desktop/web, direct SMS sending is not supported.
- On mobile, ensure contacts are configured and permissions granted.
- Missing keys trigger assertion in debug builds.
- Add missing key to active locale and English fallback map.
- Deployment architecture in place (Railway backend + Flutter web/mobile clients).
- WebSocket production host wired in both live translation screens.
- Large model artifact integrated and tracked in repository workflow.
- Objective pages updated to use valid localization keys.

