AI-powered medical SOAP note generation from audio recordings. Transform patient encounter audio into intelligent clinical notes using agentic AI.
- ποΈ Audio Transcription - Convert patient encounter recordings to text using OpenAI Whisper
- π SOAP Note Generation - Generate structured clinical notes using AI
- π€ Agentic AI - Autonomous AI agents that think, analyze, and generate like clinical experts
- π HIPAA Compliant - Enterprise-grade security for patient data
- β‘ Real-time Progress - Live updates via Server-Sent Events (SSE)
- π¨ Modern UI - Built with Next.js, React, Tailwind CSS and Shadcn
- Next.js 16 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS 4 - Styling
- Radix UI - Accessible component primitives
- Lucide React - Icon library
- FastAPI - Modern Python web framework
- PyTorch - Machine learning framework
- Transformers - Hugging Face models
- OpenAI Whisper - Speech-to-text model
- Mistral-7B - Language model for SOAP generation
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn or pnpm
- Python 3.10+
- pip3
git clone https://github.com/Arkapravo-Ghosh/totalscribe.git
cd totalscribecd backend
python3 -m venv .venvmacOS/Linux:
source .venv/bin/activateWindows:
.venv\Scripts\activatepip3 install -r requirements.txtNote: The first run will download the required AI models (Whisper and Mistral-7B), which may take some time depending on your internet connection.
cd .. # Go back to project root
npm installYou need to run both the backend and frontend servers.
Open a terminal and run:
cd backend
source .venv/bin/activate # Activate virtual environment
python3 -m uvicorn main:app --host 0.0.0.0 --port 8000The backend API will be available at http://localhost:8000
API Documentation: Visit http://localhost:8000/docs for interactive API documentation
Open a new terminal and run:
npm run devThe frontend will be available at http://localhost:3000
Frontend:
npm run build
npm startBackend:
cd backend
source .venv/bin/activate
python3 -m uvicorn main:app --host 0.0.0.0 --port 8000totalscribe/
βββ backend/ # FastAPI backend
β βββ main.py # Application entry point
β βββ requirements.txt # Python dependencies
β βββ configs/ # Configuration files
β βββ controllers/ # Request handlers
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ models/ # AI model storage
β βββ utils/ # Utility functions
βββ src/ # Next.js frontend
β βββ app/ # App Router pages
β β βββ page.tsx # Homepage
β β βββ visit/ # Visit page
β βββ components/ # React components
β β βββ ui/ # UI components
β βββ lib/ # Utilities
βββ public/ # Static assets
βββ package.json # Node.js dependencies
βββ README.md # This file
- Navigate to
http://localhost:3000 - Click "Get Started" or "Experience Agentic AI"
- Upload a patient encounter audio file (MP3, WAV, M4A, etc.)
- Click "Generate SOAP Note"
- Watch real-time progress as the AI processes your audio
- Review and copy the generated SOAP note
The backend uses default values but can be configured via environment variables:
CORS_ORIGINS- Allowed CORS origins (default:http://localhost:3000)- Model paths are auto-configured in
configs/settings.py
Create a .env.local file in the project root:
NEXT_PUBLIC_API_URL=http://localhost:8000GET /- Root endpointGET /health- Health checkGET /system/info- System information
POST /visit/create- Create a new visit with audioGET /progress/{request_id}- Stream progress updates (SSE)
GET /soap/{visit_id}- Retrieve SOAP note
Models not downloading:
- Ensure you have a stable internet connection
- Check available disk space (models require ~15GB)
Port already in use:
# Change the port
python3 -m uvicorn main:app --host 0.0.0.0 --port 8001Port 3000 already in use:
# Next.js will prompt you to use a different port
# Or manually specify:
npm run dev -- -p 3001API connection errors:
- Ensure the backend is running on port 8000
- Check CORS settings in
backend/configs/settings.py
- First request may be slower as models are loaded into memory
- GPU acceleration is used if available (CUDA/MPS)
- Processing time varies based on audio length and hardware