MedScribe is a local-first clinical assistant designed for HIPAA-compliant patient encounter analysis. It leverages the latest Google Gemma 3 family model, MedGemma 1.5 with MedASR, to analyze audio transcripts, clinical notes, and medical imaging (DICOM/X-ray) natively.
- Frontend: Next.js 15, Tailwind CSS, Shadcn UI.
- Backend: Node.js, Express, TypeScript, Sequelize (Postgres/SQLite).
- AI Service: FastAPI, PyTorch, Transformers, MedGemma 1.5, MedASR.
The fastest way to get everything running is via Docker Compose.
- Docker & Docker Compose
- Hugging Face Token (with access to
google/medgemma-1.5-4b-it)
Create a .env file in the root:
HF_TOKEN=your_huggingface_token_heredocker-compose up -d --buildAccess the UI at http://localhost:3000.
Running in Docker on Mac is limited to CPU. To unlock the full power of your M4 Pro/Max GPU (Metal), run the AI service natively.
brew install python@3.11
cd ai-service
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txtexport HF_TOKEN="your_token"
python3 main.pyThe service will auto-detect your M4 GPU (mps) and switch to high-speed Full BFloat16 precision.
- Capture: Multimodal upload (audio, notes, DICOM).
- Review: Real-time AI reasoning display.
- Output: Professional SOAP note generation.
- Orchestrates data flow between UI and AI.
- Manages encounter persistence.
- Handles DICOM processing and metadata extraction.
- MedASR: Specialized CTC decoding for clinical transcription.
- MedGemma 1.5: Native multimodal reasoning (Text + Image).
- TextStreamer: Real-time token-by-token feedback in console.
Verify AI models are loaded:
GET http://localhost:8000/health
POST http://localhost:8000/transcribe (multipart/form-data: file)
- Local-first: All PHI remains on-device. No data is sent to external cloud APIs (except for initial weight downloading from Hugging Face).
- Open Weights: Uses Google's open-weights clinical models.
This project is licensed under the MIT License - see the LICENSE file for details.
MedScribe v1.1.0 | Powered by Google MedGemma 1.5 & MedASR