Architecture and implementation by Jinan Kordab. Copyright (c) 2026. All rights reserved.
Anonymous clinical interviewing pipeline with automated podcast generation.
video.mp4
A production-grade voice agent that automates pre-consultation clinical intake. The LLM conducts a structured interview by asking clinical questions aloud; the patient responds by speaking into a microphone. Every response is transcribed, analyzed, and synthesized into a structured audio podcast for physician review.
The system is designed for speed, privacy, and operational simplicity. A complete clinical questionnaire is processed in under three minutes from start to podcast delivery.
Patient (Microphone)
|
| Web Audio Capture
v
+------------------+ +------------------+ +------------------+
| Groq STT |----->| LLM |----->| ElevenLabs TTS |
| Speech-to-Text | | Clinical Logic | | Text-to-Speech |
+------------------+ +------------------+ +------------------+
| |
| Structured Data | Audio Reply
v v
+------------------+ Patient (Speaker)
| SESSIONS/ |
| Podcast + Audio |
+------------------+
|
| MP3 Download
v
+------------------+
| Physician Review |
| (JWT Dashboard) |
+------------------+
Pipeline flow: The LLM asks a clinical question via TTS. The patient answers by voice. Groq transcribes the answer. The LLM evaluates the response and asks the next relevant question. After all questions are answered, the full encounter is compiled into a downloadable MP3 podcast.
| Capability | Detail |
|---|---|
| Anonymous by Design | No patient identifiers stored. Audio is processed transiently; only the final structured podcast persists. |
| Sub-3-Minute Pipeline | End-to-end latency from first question to podcast delivery is kept under three minutes through model selection and pipeline optimization. |
| Full AI Stack | Groq for real-time STT, LLM for clinical reasoning and question routing, ElevenLabs for neural TTS with natural prosody. |
| Bilingual | French and English clinical questionnaires tailored to regional health authority requirements. |
| Auto-Generated Podcast | Each encounter produces a structured MP3 combining all questions and responses as a narrative summary for the physician. |
| Single-Command Deploy | docker compose up -d on any machine with Docker. No manual dependency installation required. |
| JWT-Secured Dashboard | Physician access to encounter recordings and session history behind token-based authentication. |
git clone https://github.com/your-org/clinical-intake.git
cd clinical-intake
cp .env.example .env
# Add your API keys: GROQ_API_KEY, LLM_API_KEY, ELEVENLABS_API_KEY
docker compose up -d| Role | URL | Auth |
|---|---|---|
| Patient Intake | http://localhost:3000 |
None |
| Physician Login | http://localhost:3000/login.html |
doctor / admin123 |
| Variable | Purpose | Provider |
|---|---|---|
GROQ_API_KEY |
Speech-to-Text transcription | groq.com |
LLM_API_KEY |
Clinical reasoning and question generation | Your LLM provider |
ELEVENLABS_API_KEY |
Text-to-Speech voice synthesis | elevenlabs.io |
ADMIN_USER / ADMIN_PASSWORD |
Physician dashboard credentials | Self-defined |
The following MP3 files were generated by the system running inside Docker and downloaded from the container's SESSIONS/ volume. They represent complete clinical encounter podcasts as heard by the reviewing physician.
| Recording | Language | Duration | File |
|---|---|---|---|
| French Clinical Encounter | French | ~3 min | session-fr.mp3 |
| English Clinical Encounter | English | ~3 min | session-en.mp3 |
npm install
npm testTests spawn a real Express server on port 3099 using mock API credentials. No external service connectivity is required.
| Suite | Tests | Result |
|---|---|---|
| Health Endpoint | 1 | Passing |
| Authentication (login, JWT, rejection) | 6 | Passing |
| Session Management (create, list, auth-gate) | 4 | Passing |
| Chat Pipeline (audio validation) | 2 | Passing |
| Podcast Generation (guard conditions) | 1 | Passing |
| Session Reset | 1 | Passing |
| Static Asset Serving | 4 | Passing |
| Total | 19 | 100% Passing |
.
├── Dockerfile # Multi-stage build, Node 22 Alpine
├── docker-compose.yml # Single-command orchestration
├── entrypoint.sh # Runtime permission bootstrap
├── server.js # Express API, AI pipeline, JWT auth
├── package.json # Dependencies and scripts
├── jest.config.json # Test runner configuration
├── .env.example # Environment template (no secrets)
├── .dockerignore
├── public/
│ ├── index.html # Patient intake interface
│ ├── login.html # Physician authentication
│ └── doctor.html # Physician dashboard
├── questions/
│ ├── fr.txt / fr_test.txt # French clinical questionnaire
│ └── en.txt / en_test.txt # English clinical questionnaire
├── img/ # Brand assets
├── demo/ # Sample podcast recordings
└── tests/
└── server.test.js # 19 integration tests
MIT. Copyright (c) 2026 Jinan Kordab. See LICENSE.



