Privacy-First, AI-Powered, Voice-Only Mental Health Chatbot (Omani Arabic)
Omani Voice Therapist is a privacy-focused, AI-powered web application designed to provide empathetic, culturally relevant mental health support in Omani Arabic—using only voice.
The system enables users to speak naturally via their browser, receive real-time AI-powered therapeutic replies, and never requires text or file uploads.
- Voice In, Voice Out: Speak your message, listen to the bot’s reply.
- Omani Arabic: Culturally tuned prompts and responses.
- Anonymous & Private: All data is stored locally unless otherwise configured.
- NOT a replacement for professional medical advice or emergency services.
- 🎤 Microphone Input: Record directly in-browser (Streamlit or Gradio)
- 🗣️ Speech-to-Text (STT): Converts voice to text using Gemini API
- 💬 Empathetic LLM Response: Replies are generated by Google Gemini LLM, tailored for Omani dialect and empathy
- 😌 Emotion & Crisis Detection: Analyzes speech for emotional state and flags possible crises
- 🔊 Text-to-Speech (TTS): Bot replies are sent back as high-quality audio
- 🗃️ Session Logging: Secure, local-only logging of all conversations and metadata
- 🛡️ Consent Gate: User must accept privacy policy and consent for session logging
- 🏗️ Containerized: Fully dockerized for easy deployment
- 🧠 Self-Evolving Memory: Analyzes past sessions to build a long-term user profile, allowing the agent to remember preferences and recurring themes for more personalized therapy.
git clone https://github.com/SepehrRezaee/omani_therapist.git
cd omani-voice-therapistCreate a .env file in the backend/ directory (or as needed):
GEMINI_API_KEY=your_gemini_api_key_here
FRONTEND_URL=http://localhost:8501
ALLOWED_ORIGINS=["http://localhost:8501"]
DATA_DIR=datapip install -r requirements.txtdocker compose build
docker compose up- The backend (FastAPI) will be on
http://localhost:8000 - The frontend (Streamlit) will be on
http://localhost:8501
omani_therapist/
│
├── backend/
│ ├── main.py # FastAPI app
│ ├── config.py
│ ├── db.py
│ ├── models.py
│ ├── speech_utils.py
│ ├── therapy_core.py
│ ├── evolution_core.py # Self-evolution logic
│ ├── .env
│ └── ...
│
├── frontend/
│ └── app.py # Streamlit UI
│
├── data/
│ ├── user_inputs/ # Saved user voice files
│ ├── bot_outputs/ # Saved bot replies
│ └── session_logs.db # SQLite logs
│
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
└── README.md
-
Build and Run (from project root):
docker compose build docker compose up
-
Access the app:
- Frontend: http://localhost:8501
- Backend API: http://localhost:8000/docs
- All sessions are anonymous and data is stored locally by default.
- Consent is required to start any session.
- No text or voice data is uploaded to any cloud except for inference via Gemini API.
- This app is NOT a medical device and does not provide clinical diagnosis or emergency services.
- Multi-turn conversational UI (chat bubbles)
- WebRTC for true real-time streaming
- Mobile App (Flutter/React Native)
- Optional authentication for personal health logs
- Improved Omani dialect detection and tuning
- Advanced analytics (local only)
- Better offline/edge deployment support
- Customizable crisis escalation logic
PRs, issues, and suggestions are welcome! Please open an issue or submit a pull request.
- Email: [email protected]
- GitHub: github.com/SepehrRezaee
- LinkedIn: linkedin.com/in/sepehr-rezaee
- Personal Website: SepehrRezaee.com
MIT License. See LICENSE for details.
Made with ❤️ for the people of Oman.