How olekbliter/clarity-scribe works
ClarityScribe is a clinical copilot intended to turn a therapy-session recording into transcription, vocal-biomarker data, and a medical note. The visible runtime includes audio processing, privacy sanitization/restoration, SOAP generation, and longitudinal trend calculation; no application entry point or end-to-end orchestrator is present in the supplied tree. The README also advertises vocal biomarkers, represented in the data contracts, but the biomarker implementation is not shown. Links reflect excerpted calls or indexed module references; unsampled wiring is omitted.
Main entry points: clinical_service.py SOAP note generation · audio_transcription_service.py Patient audio pipeline · sanitizer.py Text sanitizer · ner_service.py Privacy NER service
Components 25
Audio transcription
- Patient audio pipeline
src/systems/audio_transcription/audio_transcription_service.py - Channel splitting
src/systems/audio_transcription/channel_splitter.py - Speech filtering
src/systems/audio_transcription/speech_filter.py - Voice activity detection
src/systems/audio_transcription/vad_detectors.py - Word recognition
src/systems/audio_transcription/vosk_transcription.py
Privacy processing
- Privacy NER service
src/systems/privacy_ner/ner_service.py - Text sanitizer
src/systems/privacy_ner/sanitizer.py - Regex extractor
src/systems/privacy_ner/regex_extractor.py - GLiNER extractor
src/systems/privacy_ner/gliner_extractor.py - Entity tag map
src/systems/privacy_ner/map_manager.py - Ukrainian morphology
src/systems/privacy_ner/morphology.py - Text restorer
src/systems/privacy_ner/restorer.py
Clinical documentation
- SOAP note generation
src/systems/clinical_engine/clinical_service.py - Prompt templates
src/systems/clinical_engine/prompt_manager.py - LLM interface
src/systems/clinical_engine/LLM.py - Gemini provider
src/systems/clinical_engine/Gemini.py - SOAP prompts
src/systems/clinical_engine/prompts
Longitudinal analysis
- Dynamics service
src/systems/longitudinal/dynamics_service.py - Metrics extraction
src/systems/longitudinal/metrics_extractor.py - Trend calculation
src/systems/longitudinal/trend_calculator.py
Data contracts
- Transcript result
src/schemas/contracts.py - Biomarker data contract
src/schemas/contracts.py - SOAP contracts
src/schemas/contracts.py
Other components
- Clinician
- Session recording
Connections 26
- Clinician → Session recording: records session
README.md - Session recording → Patient audio pipeline: provides audio
src/systems/audio_transcription/audio_transcription_service.py - Patient audio pipeline → Channel splitting: splits channels
src/systems/audio_transcription/audio_transcription_service.py - Patient audio pipeline → Speech filtering: filters speech
src/systems/audio_transcription/audio_transcription_service.py - Speech filtering → Voice activity detection: detects activity
src/systems/audio_transcription/speech_filter.py - Patient audio pipeline → Word recognition: recognizes words
src/systems/audio_transcription/audio_transcription_service.py - Patient audio pipeline → Transcript result: returns segments
- Transcript result → Privacy NER service: submits text
- Privacy NER service → Text sanitizer: sanitizes text
src/systems/privacy_ner/ner_service.py - Privacy NER service → Text restorer: restores text
src/systems/privacy_ner/ner_service.py - Text sanitizer → Regex extractor: extracts entities
src/systems/privacy_ner/sanitizer.py - Text sanitizer → GLiNER extractor: extracts entities
src/systems/privacy_ner/sanitizer.py - Text sanitizer → Entity tag map: assigns tags
src/systems/privacy_ner/sanitizer.py - Text sanitizer → Ukrainian morphology: analyzes words
src/systems/privacy_ner/sanitizer.py - Entity tag map → Ukrainian morphology: normalizes names
src/systems/privacy_ner/map_manager.py - Transcript result → SOAP note generation: provides transcript
src/systems/clinical_engine/clinical_service.py - Biomarker data contract → SOAP note generation: provides biomarkers
src/systems/clinical_engine/clinical_service.py - SOAP note generation → Prompt templates: formats prompts
src/systems/clinical_engine/clinical_service.py - Prompt templates → SOAP prompts: reads templates
src/systems/clinical_engine/prompt_manager.py - SOAP note generation → LLM interface: queries model
src/systems/clinical_engine/clinical_service.py - SOAP note generation → Gemini provider: defaults provider
src/systems/clinical_engine/clinical_service.py - SOAP note generation → SOAP contracts: validates outputs
src/systems/clinical_engine/clinical_service.py - SOAP note generation → Clinician: returns SOAP note
- Biomarker data contract → Dynamics service: defines metrics
- Dynamics service → Metrics extraction: extracts metrics
src/systems/longitudinal/dynamics_service.py - Dynamics service → Trend calculation: calculates trends
src/systems/longitudinal/dynamics_service.py