deaf_connect_api/
├── main.py ← FastAPI backend
├── labels.py ← 16 sign labels
├── requirements.txt ← Python dependencies
├── render.yaml ← Render config
├── model/
│ └── sign_model.h5 ← Your trained model (copy here)
└── static/
└── api-client.js ← Frontend JS client
Copy your trained model:
model/sign_model.h5 ← apna trained model yahan rakho
labels.py ← already ready hai
cd deaf_connect_api
git init
git add .
git commit -m "Deaf Connect AI FastAPI backend"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/deaf-connect-api.git
git push -u origin main- render.com pe jao → Sign up (free)
- "New +" → "Web Service"
- GitHub repo connect karo
- Settings:
- Name: deaf-connect-api
- Environment: Python 3
- Build Command:
pip install -r requirements.txt - Start Command:
uvicorn main:app --host 0.0.0.0 --port $PORT
- "Create Web Service" click karo
- Wait 3-5 minutes — deploy hoga
- URL milega:
https://deaf-connect-api.onrender.com
api-client.js mein yeh line update karo:
const API_BASE_URL = "https://deaf-connect-api.onrender.com";Phir Vercel pe push karo — auto deploy ho jayega.
| Method | URL | Description |
|---|---|---|
| GET | /health | Server status check |
| GET | /labels | All 16 labels |
| GET | /sentences | All 10 sentences |
| POST | /predict | Landmarks → Sign label |
| POST | /build-sentence | Words → Sentence |
| POST | /speak | Text → Audio (base64) |
| POST | /transcribe | Audio → Text |
# Health check
curl https://deaf-connect-api.onrender.com/health
# Get labels
curl https://deaf-connect-api.onrender.com/labels
# Test predict (dummy data)
curl -X POST https://deaf-connect-api.onrender.com/predict \
-H "Content-Type: application/json" \
-d '{"landmarks": [0.5]*126, "confidence_threshold": 0.65}'
# Test sentence
curl -X POST https://deaf-connect-api.onrender.com/build-sentence \
-H "Content-Type: application/json" \
-d '{"words": ["accident", "now", "help"]}'After deploy, visit:
- Swagger UI: https://deaf-connect-api.onrender.com/docs
- ReDoc: https://deaf-connect-api.onrender.com/redoc
-
Free Render — server sleeps after 15 min inactivity
- First request after sleep takes ~30 seconds (cold start)
- Add a health ping every 10 min to keep alive
-
Model size — sign_model.h5 large hai toh GitHub LFS use karo:
git lfs install git lfs track "*.h5" git add .gitattributes -
pyttsx3 on Linux — Render Linux pe hai, pyttsx3 needs espeak: Add this file:
build.shapt-get install -y espeak pip install -r requirements.txt
Change build command in Render to:
bash build.sh