MedVoice AI answers your clinic's phone, talks naturally with patients, understands what they need, and routes every call correctly β appointments, refills, urgent triage, or a human transfer. Every call is recorded, transcribed, and surfaced in a clean dashboard for your staff.
HIPAA Β· E911 Β· TCPA aware β compliance enforced at the infrastructure level.
Think of it as a 24/7 front-desk helper for medical offices. When a patient calls:
- π Answers automatically β no missed calls, no hold music limbo
- π£οΈ Talks in natural voice β real-time speech, not a rigid IVR menu
- π§ Understands intent β appointment, refill, billing, urgent issue, or a question
- π Routes correctly β AI response, human transfer, or voicemail
- π¨ Triages urgency β critical calls jump straight to a human with a 911 disclaimer
- π Logs everything β recordings, transcripts, and analytics in one dashboard
Built for: clinics Β· family medicine Β· specialty practices Β· small-to-medium healthcare teams.
Live counters for inbound calls, active calls, average handle time, and resolution rate, plus a 30-day urgency breakdown (Critical / Urgent / Routine).
Filter by date range, disposition, and urgency. Export to CSV. Play S3-hosted recordings and read the full transcript for any call.
A drag-and-drop node editor (React Flow). Compose Greeting, Menu, AI Agent, Triage, Transfer, Voicemail, and After-Hours nodes, then configure each one in the side panel and save a new version.
Resolution rate, average handle time, call volume by hour, and intent distribution across a selectable 7 / 14 / 30-day window.
| Layer | Technology | Role |
|---|---|---|
| Frontend | Next.js 14 (App Router) Β· React Flow Β· Recharts | Dashboard, visual phone-tree builder, analytics charts |
| Backend | FastAPI (async) Β· Uvicorn | REST API + Twilio webhooks + media-stream WebSocket |
| Database | PostgreSQL 15 Β· SQLAlchemy Β· Alembic | Multi-tenant data, async via asyncpg |
| Telephony | Twilio Programmable Voice | Inbound calls, bidirectional media streaming |
| Speech-to-Text | Deepgram Nova-2 | Real-time streaming transcription (mulaw 8kHz) |
| Text-to-Speech | ElevenLabs Turbo v2.5 | Streaming voice synthesis |
| AI Reasoning | OpenAI GPT-4o / GPT-4o-mini | Intent classification + response generation |
| Cache / Queue | Redis 7 | Phone-tree cache + Celery broker |
| Background Jobs | Celery 5 | Post-call transcription, alerts, DB writes |
| Storage | AWS S3 (SSE-KMS) | Encrypted recordings + presigned playback URLs |
| Auth | Clerk | JWT auth + multi-tenant org management |
| Monitoring | Sentry Β· Nginx | Error tracking + TLS / WebSocket reverse proxy |
Patient dials ββββββββββββ βββββββββββββββ ββββββββββββββββ ββββββββββββββ
the clinic βββΊ β Twilio ββββΊβ Deepgram ββββΊβ GPT-4o ββββΊβ ElevenLabs ββββΊ Patient
number β Voice β β (STT) β β intent + β β (TTS) β hears
ββββββββββββ βββββββββββββββ β response β ββββββββββββββ a reply
β ββββββββββββββββ
β β
βΌ βΌ
Phone Tree Engine Triage scoring
(state machine, Redis) (β₯8 β instant transfer)
β
βΌ
Disposition: AI answer Β· transfer Β· voicemail Β· appointment
β
βΌ
Celery: upload recording, finalize transcript, notify staff
β
βΌ
Dashboard π
- Patient calls your practice number β Twilio answers.
- MedVoice greets the caller and streams audio both ways.
- Deepgram transcribes; GPT-4o detects intent and generates a reply.
- The Phone Tree Engine advances state; triage can override and transfer immediately.
- The call ends with the right disposition; staff sees it all in the dashboard.
See
archetecture.mdfor the full end-to-end architecture, data models, and node schema.
git clone https://github.com/malakazlan/DOC_CALL.git
cd DOC_CALL
cp .env.example .env # fill in your real keys and URLsIn the Supabase SQL Editor, run backend/supabase_schema.sql.
cd backend
python -m venv .venvActivate the virtual environment:
| OS | Command |
|---|---|
| Windows PowerShell | .\.venv\Scripts\Activate.ps1 |
| Windows CMD | .venv\Scripts\activate.bat |
| macOS / Linux | source .venv/bin/activate |
Then install and run:
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000Create frontend/.env.local with your Clerk keys and the API URL, then:
cd frontend
npm install
npm run devOpen http://localhost:3000 π
π³ Prefer Docker?
docker compose upbrings up the full stack.
medvoice-ai/
βββ backend/ # FastAPI API
β βββ app/
β β βββ core/ # Phone-tree engine, intent, triage
β β βββ models/ # SQLAlchemy ORM
β β βββ routers/ # Twilio, practices, phone-trees, calls
β β βββ services/ # STT, TTS, LLM, voice agent, recording
β β βββ workers/ # Celery tasks
β βββ supabase_schema.sql # Run in Supabase to create tables
β βββ requirements.txt
β
βββ frontend/ # Next.js 14
β βββ app/dashboard/ # Dashboard, calls, phone-tree, analytics
β βββ components/
β βββ lib/
β
βββ docs/ # Product screenshots
βββ docker-compose.yml
βββ archetecture.md # Full system architecture
Full breakdown in
STRUCTURE.md.
- HIPAA β PHI encrypted at rest (S3 SSE-KMS, encrypted DB volume) and in transit (TLS 1.2+). Caller numbers stored hashed; audit trail on all data access.
- E911 β emergency disclaimer played on every call; immediate 911 instruction for the highest urgency scores.
- TCPA β inbound-only by design; recording-consent prompt on every call, with 2-party-state disclosures auto-selected.
If your Twilio account is on a trial plan, incoming calls are limited by Twilio's rules. To accept calls from any number worldwide, upgrade Twilio to a paid account.
π github.com/malakazlan/DOC_CALL
MedVoice AI β AI phone automation for U.S. medical practices.



