Janmitra is a dialect-aware voice AI that connects rural Indian citizens to government services, bridging the information gap that affects 330 million people.
Rural India faces a critical information asymmetry crisis:
- 68% of rural adults cannot name one government credit scheme (RBI 2024)
- <9% use internet in their local language (IAMAI 2023)
- Average 3.2 physical visits & ₹260 spent per failed loan application
- 27 days average delay in complaint redressal
Middlemen exploit this gap, language barriers isolate citizens, and outdated IVR systems fail to serve local dialects.
Janmitra is a missed-call away, dialect-aware voice bot that:
- Answers only in local tongues (Hindi, Awadhi, Bundeli, Telugu, and more)
- Pulls verified information from government APIs and databases
- Warm-transfers callers to the exact officer when human escalation is needed
- Works offline-capable for areas with poor connectivity
User Speech → LiveKit Frontend (React) → LiveKit Server → Sarvam AI Agent
↓ ↓
WebRTC Connection Dialect Detection
↓ ↓
Search Tools → Government APIs RAG System
↓ ↓
Verified Information Contextual Responses
- Frontend: Next.js React app with LiveKit Components for WebRTC voice interface
- Backend: LiveKit Agents Node.js server with Sarvam AI model
- AI Pipeline: End-to-end audio processing with automatic dialect detection
- Tools: Web search for government information, RAG for verified knowledge
- Future: Exotel telephony integration for toll-free access
- 🔊 Automatic dialect detection and response in local languages
- 📞 Voice-first interface optimized for low-literacy users
- 🔍 Verified government data from official sources
- 👥 Officer directory with direct contact information
- 📱 Progressive enhancement from web to telephony
- 🌐 Offline-capable responses for poor connectivity
- Node.js 18+ and pnpm
- LiveKit Cloud account (sign up)
- Sarvam AI API Key
-
Clone the repository
git clone <repository-url> cd janmitra
-
Install dependencies
# Frontend cd frontend && pnpm install # Backend cd ../backend && pnpm install
-
Set up environment variables
Frontend (.env.local)
LIVEKIT_API_KEY=your_livekit_api_key LIVEKIT_API_SECRET=your_livekit_api_secret LIVEKIT_URL=https://your-livekit-server-url
Backend (.env.local)
LIVEKIT_URL=https://your-livekit-server-url LIVEKIT_API_KEY=your_livekit_api_key LIVEKIT_API_SECRET=your_livekit_api_secret SARVAM_AI_API_KEY=your_sarvam_ai__api_key
-
Download AI models (backend)
cd backend pnpm run download-files -
Start the services
# Terminal 1: Backend cd backend && pnpm run dev # Terminal 2: Frontend cd frontend && pnpm dev
-
Open your browser Visit http://localhost:3000
janmitra/
├── frontend/ # Next.js React app
│ ├── app/ # Next.js app router
│ ├── components/ # React components
│ └── lib/ # Utilities
├── backend/ # LiveKit Agents server
│ ├── src/ # TypeScript source
│ └── dist/ # Compiled output
└── docs/ # Documentation
Frontend:
pnpm dev- Start development serverpnpm build- Build for productionpnpm lint- Run ESLintpnpm format- Format code with Prettier
Backend:
pnpm run dev- Start development serverpnpm run build- Build TypeScriptpnpm run typecheck- Type checkingpnpm run lint- Run ESLintpnpm test- Run tests
- TypeScript for type safety
- ESLint + Prettier for code formatting
- Prettier plugin for import sorting
- Follow existing patterns in the codebase
Janmitra should handle these conversations naturally:
PM Kisan Scheme Query:
User: "मेरे खेत में कितने एकड़ हैं, क्या मुझे पीएम किसान योजना का पैसा मिलेगा?"
Agent: "हाँ, अगर आपके पास 2 हेक्टेयर तक जमीन है तो आप PM Kisan योजना के लिए योग्य हैं..."
Loan Eligibility:
User: "मैं ST/SC category का हूँ, कौन सी government loan schemes हैं?"
Agent: "आपके लिए विशेष schemes हैं जैसे PM SVANidhi, Stand-Up India..."
Officer Transfer:
User: "मेरी pension नहीं मिली, किससे contact करूँ?"
Agent: "आपके district का pension officer का number है +91-XXXXXXXXXX..."
-
Deploy backend to LiveKit Cloud
lk app deploy
-
Update frontend environment with production URLs
-
Configure domain and SSL certificates
# Build backend image
cd backend && docker build -t janmitra-backend .
# Run with environment variables
docker run -p 3001:3001 \
-e LIVEKIT_URL=$LIVEKIT_URL \
-e SARVAM_AI_KEY=$SARVAM_AI_API_KEY \
janmitra-backend- Phase 1: Exotel telephony integration for toll-free access
- Phase 2: Direct government API integration
- Phase 3: Officer directory with real-time availability
- Phase 4: Multi-modal support (SMS, WhatsApp)
- Phase 5: Offline PWA capabilities
We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Follow the existing code style
- Add tests for new features
- Update documentation
- Ensure all tests pass
- Code: MIT License
- Content: CC-BY-4.0 License
Built with LiveKit Agents and powered by Sarvam AI. Inspired by the need to bridge India's rural-urban digital divide.
Contact: For questions or partnerships, reach out to the development team.
