A voice-powered AI assistant for Kenya's eCitizen government services platform. Features natural language understanding, talking avatar animation, and accessible design for all users.
# Rafiki.ai - Kenya Government Voice Assistant
A production-grade, accessible voice assistant helping citizens navigate Kenya government services via voice in **English**, **Kiswahili**, and **Mixed/Code-Switching**.
## π― Features
### Core Voice Assistant
- π€ **Voice-based interaction** with speech recognition and text-to-speech
- π€ **AI-powered NLU** using Google Gemini with RAG (citations included)
- π°πͺ **Bilingual support** - English, Kiswahili, and code-switching
- π£οΈ **Talking avatar** with realistic lip-sync (SadTalker + Google Colab GPU)
- β‘ **50-100x faster** video generation with T4 GPU acceleration
### Government Services Workflow Engine
- π **7 Pre-built Workflows** for common government services:
- NTSA Driving License appointment booking
- KRA Nil Returns filing guidance
- DCI Good Conduct Certificate application
- Huduma Centre location finder
- Constitutional knowledge Q&A
- Feedback submission
- Emergency reporting
- β
**Built-in validators** for Kenya-specific data:
- Phone numbers (07xx, +254xx)
- National ID (7-8 digits)
- KRA PIN (A###########B format)
- π **State machine** with pause/resume/cancel support
### Security & Compliance
- π **Immutable audit logging** with SHA-256 hash chaining
- π΅οΈ **PII auto-redaction** in logs
- π¨ **Fraud detection** with rate limiting
- π± **SMS confirmations** via Africa's Talking
### Accessibility
- βΏ **WCAG 2.1 AA compliant** UI
- π **Conversation history** with transcript downloads
- πΊοΈ **Huduma Centre locator** with directions
## Architecture
```
Frontend (React/TypeScript) Backend (FastAPI) External Services
------------------------- ----------------- -----------------
- Vite dev server - REST API - Google Gemini AI
- Avatar components - Workflow Engine - ElevenLabs TTS
- useSadTalker hook - RAG with ChromaDB - Africa's Talking SMS
- Audio visualization - Session management - Google β¦