# MediVoice-Ghana
# MediVoice GH - AI Voice Health Advisor for Ghana
**Author:** John Evans Okyere
An AI-powered voice health advisor designed specifically for Ghana. Users can describe their symptoms via voice or text, receive health information and advice, detect emergencies, and book medical appointments.
## Features
- **Voice Interaction**: Record symptoms via voice, get text AND voice responses
- **Symptom Analysis**: AI-powered symptom analysis using RAG (Retrieval-Augmented Generation)
- **Emergency Detection**: Automatic detection of emergency keywords with immediate alerts
- **Medical Knowledge Base**: 20+ common health conditions in Ghana (Malaria, Typhoid, Cholera, etc.)
- **Appointment Booking**: Integrated with n8n for automated appointment scheduling
- **Conversation History**: Track all past health consultations
- **Multi-channel**: Web interface + optional Telegram bot
- **LLM Fallback Chain**: Grok (xAI) → Groq (Llama 3.1) → Gemini Flash for reliability
## Tech Stack
### Backend
- **FastAPI** (Python 3.11+)
- **Neon Postgres** - Database
- **Redis (Upstash)** - Caching
- **ChromaDB** - Vector database for RAG
- **LangChain** - LLM orchestration
### AI/ML
- **LLMs**: Grok (xAI), Groq (Llama 3.1), Gemini Flash
- **STT**: Groq Whisper API
- **TTS**: Google Cloud TTS Standard
- **Embeddings**: sentence-transformers (all-MiniLM-L6-v2)
### Frontend
- **Next.js 14** (App Router)
- **TypeScript**
- **Tailwind CSS**
- **shadcn/ui** components
### Automation
- **n8n** - Appointment booking workflows
### Deployment
- **Backend**: Render (free tier)
- **Frontend**: Vercel (free tier)
## Project Structure
```
MediVoice-Ghana/
├── backend/
│ ├── app/
│ │ ├── api/
│ │ │ └── routes/
│ │ │ ├── auth.py # Authentication endpoints
│ │ │ ├── voice.py # Voice interaction
│ │ │ ├── appointments.py # Appointment booking
│ │ │ ├── conversations.py # History
│ │ │ ├── telegram.py …