blundergoat/ambient-scribe

0

stars

190

commits

Python

primary language

Aug 30, 2026

updated

README

Ambient Scribe

Real-time medical transcription system that captures clinical conversations, performs speaker diarization and automatic speech recognition, and infers DOCTOR/PATIENT roles -- delivering labeled transcripts to the browser in real time. After Stop, a second ASR pass corrects the transcript and an off-GPU agent drafts a citation-linked SOAP note for clinician review.

Consultation Flow

While recording

  1. Transcribe and clean speech: Multitalker Parakeet creates timestamped words, then medical_lexicon.txt corrects known ASR variants before they reach the live transcript.
  2. Identify speakers: Sortformer labels detected speakers with IDs such as spk_0 and spk_1.
  3. Assign roles: The role agent maps each speaker ID to DOCTOR or PATIENT.

After recording stops

  1. Correct the transcript: By default, Parakeet Unified automatically re-transcribes the full recording when it is no longer than 15 minutes.
  2. Refine role labels: Corrected words keep their live labels, changing only when text provides a clear role cue. Full speaker diarization does not run again.
  3. Generate the summary: Clicking Generate summary uses the corrected transcript. If correction is unavailable and the live transcript remains verified, the app uses that instead.

Architecture

+-----------+  GET /scribe + helper proxies   +--------------+
|           | ------------------------------> |  Symfony App |
|           |                                 |  (PHP 8.3+)  |
|           |                                 +------+-------+
|           |                                        | proxied HTTP
|  Browser  |  WebSocket (16 kHz PCM audio)   +------v-------------------+
|           | ------------------------------> |  FastAPI NeMo agent      |
|           |                                 |  - Diarization (GPU)     |
|           |                                 |  - ASR Parakeet (GPU)    |
|           |                                 |  - Post-stop 2nd-pass ASR|
|           |                                 |  - Role inference        |
|           |                                 |    DOCTOR / PATIENT      |
|           |                                 |    (Strands, off-GPU)    |
|           |                                 |  - SOAP summary (off-GPU)|
|           |                                 +------+-------------------+
|           |                                        | publish raw/roles/summary
|           |  Mercure SSE (transcript events) +-----v--------+
|           | <------------------------------- |  Mercure Hub |
+-----------+                                  +--------------+

Prerequisites

  • Docker and Docker Compose
  • NVIDIA GPU with CUDA support and 16 GB VRAM - loading both speech models peaks at 11.3 GB, and buffered audio pushes it higher across a long consultation
  • NVIDIA Container Toolkit installed on the host
  • 16GB+ system RAM recommended
  • AWS credentials configured for Bedrock access

Quick Start

cp .env.example .env
docker compose up --build

The application will be available at http://localhost:48082.

The copied .env selects AWS Bedrock for role inference and summaries (ROLE_AGENT_MODEL_PROVIDER=bedrock), so Bedrock credentials must be present. For a fully local CPU stack, set ROLE_AGENT_MODEL_PROVIDER=ollama and start with the ollama Compose profile. ./scripts/start-dev.sh is the guided local-dev entry point: it enables the profile automatically and runs health checks.

Tech Stack

LayerTechnology / model
ASR + DiarizationNVIDIA NeMo Multitalker Parakeet 0.6B (nvidia/multitalker-parakeet-streaming-0.6b-v1) + streaming Sortformer v2.1 (nvidia/diar_streaming_sortformer_4spk-v2.1) on GPU
Post-visit ASRNVIDIA NeMo Parakeet Unified English 0.6B (nvidia/parakeet-unified-en-0.6b), second pass after Stop on GPU
Role InferenceStrands SDK + Claude Haiku 4.5 (au.anthropic.claude-haiku-4-5-20251001-v1:0) on AWS Bedrock, or Qwen 3.5 9B (qwen3.5:9b) on CPU-only Ollama
SOAP SummaryStrands SDK + Claude Haiku 4.5 (au.anthropic.claude-haiku-4-5-20251001-v1:0) on AWS Bedrock, or Qwen 3.5 9B (qwen3.5:9b) on CPU-only Ollama
BackendPHP 8.3+, Symfony 6.4
Audio PipelineWebSocket (browser -> Python)
Transcript DeliveryMercure Hub (SSE)
FrontendTwig, Tailwind CSS, vanilla JS modules
InfrastructureDocker Compose, NVIDIA Container Toolkit

Development

composer test          # PHPUnit
composer analyse       # PHPStan level 10
composer cs:check      # PHP-CS-Fixer dry-run
composer preflight     # All quality checks in sequence
strands_agents/.venv/bin/pytest tests/python/ -q   # Python agent tests

Documentation

Author

Built by Matthew Hansen.

Contributors

mattyhansen

190 commits

blundergoat/ambient-scribe

0

stars

190

commits

Python

primary language

Aug 30, 2026

updated

README

Ambient Scribe

Real-time medical transcription system that captures clinical conversations, performs speaker diarization and automatic speech recognition, and infers DOCTOR/PATIENT roles -- delivering labeled transcripts to the browser in real time. After Stop, a second ASR pass corrects the transcript and an off-GPU agent drafts a citation-linked SOAP note for clinician review.

Consultation Flow

While recording

  1. Transcribe and clean speech: Multitalker Parakeet creates timestamped words, then medical_lexicon.txt corrects known ASR variants before they reach the live transcript.
  2. Identify speakers: Sortformer labels detected speakers with IDs such as spk_0 and spk_1.
  3. Assign roles: The role agent maps each speaker ID to DOCTOR or PATIENT.

After recording stops

  1. Correct the transcript: By default, Parakeet Unified automatically re-transcribes the full recording when it is no longer than 15 minutes.
  2. Refine role labels: Corrected words keep their live labels, changing only when text provides a clear role cue. Full speaker diarization does not run again.
  3. Generate the summary: Clicking Generate summary uses the corrected transcript. If correction is unavailable and the live transcript remains verified, the app uses that instead.

Architecture

+-----------+  GET /scribe + helper proxies   +--------------+
|           | ------------------------------> |  Symfony App |
|           |                                 |  (PHP 8.3+)  |
|           |                                 +------+-------+
|           |                                        | proxied HTTP
|  Browser  |  WebSocket (16 kHz PCM audio)   +------v-------------------+
|           | ------------------------------> |  FastAPI NeMo agent      |
|           |                                 |  - Diarization (GPU)     |
|           |                                 |  - ASR Parakeet (GPU)    |
|           |                                 |  - Post-stop 2nd-pass ASR|
|           |                                 |  - Role inference        |
|           |                                 |    DOCTOR / PATIENT      |
|           |                                 |    (Strands, off-GPU)    |
|           |                                 |  - SOAP summary (off-GPU)|
|           |                                 +------+-------------------+
|           |                                        | publish raw/roles/summary
|           |  Mercure SSE (transcript events) +-----v--------+
|           | <------------------------------- |  Mercure Hub |
+-----------+                                  +--------------+

Prerequisites

  • Docker and Docker Compose
  • NVIDIA GPU with CUDA support and 16 GB VRAM - loading both speech models peaks at 11.3 GB, and buffered audio pushes it higher across a long consultation
  • NVIDIA Container Toolkit installed on the host
  • 16GB+ system RAM recommended
  • AWS credentials configured for Bedrock access

Quick Start

cp .env.example .env
docker compose up --build

The application will be available at http://localhost:48082.

The copied .env selects AWS Bedrock for role inference and summaries (ROLE_AGENT_MODEL_PROVIDER=bedrock), so Bedrock credentials must be present. For a fully local CPU stack, set ROLE_AGENT_MODEL_PROVIDER=ollama and start with the ollama Compose profile. ./scripts/start-dev.sh is the guided local-dev entry point: it enables the profile automatically and runs health checks.

Tech Stack

LayerTechnology / model
ASR + DiarizationNVIDIA NeMo Multitalker Parakeet 0.6B (nvidia/multitalker-parakeet-streaming-0.6b-v1) + streaming Sortformer v2.1 (nvidia/diar_streaming_sortformer_4spk-v2.1) on GPU
Post-visit ASRNVIDIA NeMo Parakeet Unified English 0.6B (nvidia/parakeet-unified-en-0.6b), second pass after Stop on GPU
Role InferenceStrands SDK + Claude Haiku 4.5 (au.anthropic.claude-haiku-4-5-20251001-v1:0) on AWS Bedrock, or Qwen 3.5 9B (qwen3.5:9b) on CPU-only Ollama
SOAP SummaryStrands SDK + Claude Haiku 4.5 (au.anthropic.claude-haiku-4-5-20251001-v1:0) on AWS Bedrock, or Qwen 3.5 9B (qwen3.5:9b) on CPU-only Ollama
BackendPHP 8.3+, Symfony 6.4
Audio PipelineWebSocket (browser -> Python)
Transcript DeliveryMercure Hub (SSE)
FrontendTwig, Tailwind CSS, vanilla JS modules
InfrastructureDocker Compose, NVIDIA Container Toolkit

Development

composer test          # PHPUnit
composer analyse       # PHPStan level 10
composer cs:check      # PHP-CS-Fixer dry-run
composer preflight     # All quality checks in sequence
strands_agents/.venv/bin/pytest tests/python/ -q   # Python agent tests

Documentation

Author

Built by Matthew Hansen.

Contributors

mattyhansen

190 commits

Languages

Python

64.1%

Shell

18.3%

JavaScript

10.4%

PHP

3.7%

HCL

2.0%

Twig

1.4%