How louisnmcdonald/pomona-translation-services works
This is an on-device speech-captioning app: an operator starts a transcription session, supplies microphone audio, and receives translated captions; audience viewers follow captions separately. Audio is buffered into utterances, transcribed with Whisper, corrected, translated, then broadcast, with optional local speech playback. The graph also preserves model setup and selection, session logs, status, and countdown controls. Edges reflect shown code or README statements; unsampled implementation details are not inferred, so some UI and subsystem links are omitted.
Main entry points: CaptionHub.cs Caption hub · CaptionPipelineService.cs Caption pipeline · Program.cs ASP.NET app host · AudioFrameChannel.cs Audio frame channel
Components 24
Operator and audience
- Operator dashboard
Components/Pages/Home.razor - Caption page
Components/Pages/Captions.razor - Caption client
wwwroot/caption-client.js
Audio and transcription
- Audio capture
Services/AudioCaptureService.cs - Audio frame channel
Services/AudioFrameChannel.cs - Utterance buffer
Services/SpeechUtteranceBuffer.cs - Caption pipeline
Services/CaptionPipelineService.cs - Whisper model selection
Services/WhisperModelSelectionService.cs - Whisper transcription
Services/WhisperTranscriber.cs - Transcript corrections
Services/TranscriptCorrectionService.cs
Translation and speech
- Translation engine selection
Services/TranslationEngineSelectionService.cs - ONNX translation
Services/OnnxTranslationService.cs - Llama translation
Services/LlamaTranslationService.cs - Speech output
Services/PiperSpeechService.cs - LatinX worker
Services/LatinXSpeechWorker.cs
Session and runtime
- Caption hub
Hubs/CaptionHub.cs - Transcription sessions
Services/TranscriptionSessionService.cs - Runtime status
Services/RuntimeStatusStore.cs - Countdown controls
Services/CountdownService.cs - Translation model setup
Services/TranslationModelBootstrapService.cs - Pipeline settings
Services/TranslationPipelineOptions.cs - ASP.NET app host
Program.cs
Other components
- Operator
- Audience viewer
Connections 32
- Operator → Operator dashboard: operates
README.md - Audience viewer → Caption page: views captions
README.md - Operator dashboard → Caption hub: controls session
- Caption page → Caption client: uses client
- Caption client → Caption hub: receives captions
README.md - Operator → Audio capture: grants microphone
README.md - Audio capture → Audio frame channel: writes audio
Services/AudioCaptureService.cs - Caption hub → Audio frame channel: queues audio
Hubs/CaptionHub.cs - Caption hub → Transcription sessions: starts or ends
Hubs/CaptionHub.cs - Caption hub → Whisper model selection: selects model
Hubs/CaptionHub.cs - Caption hub → Translation engine selection: selects engine
Hubs/CaptionHub.cs - Caption hub → Speech output: selects voice
Hubs/CaptionHub.cs - Caption hub → Countdown controls: controls countdown
Hubs/CaptionHub.cs - Audio frame channel → Runtime status: updates level
Services/AudioFrameChannel.cs - Audio frame channel → Transcription sessions: checks session
Services/AudioFrameChannel.cs - Caption pipeline → Audio frame channel: reads frames
Services/CaptionPipelineService.cs - Caption pipeline → Whisper transcription: transcribes audio
Services/CaptionPipelineService.cs - Caption pipeline → Transcript corrections: corrects transcript
Services/CaptionPipelineService.cs - Caption pipeline → Translation engine selection: translates text
Services/CaptionPipelineService.cs - Caption pipeline → Caption hub: broadcasts caption
Services/CaptionPipelineService.cs - Caption pipeline → Speech output: speaks translation
Services/CaptionPipelineService.cs - Whisper model selection → Whisper transcription: initializes model
Services/WhisperModelSelectionService.cs - Translation engine selection → ONNX translation: dispatches translation
Services/TranslationEngineSelectionService.cs - Translation engine selection → Llama translation: dispatches translation
Services/TranslationEngineSelectionService.cs - Speech output → LatinX worker: delegates synthesis
Services/PiperSpeechService.cs - Transcription sessions → Runtime status: updates session state
Services/TranscriptionSessionService.cs - Caption pipeline → Runtime status: updates caption count
Services/CaptionPipelineService.cs - ASP.NET app host → Caption hub: maps endpoint
Program.cs - ASP.NET app host → Caption pipeline: hosts service
Program.cs - ASP.NET app host → Audio capture: hosts service
Program.cs - ASP.NET app host → Translation model setup: hosts service
Program.cs - ASP.NET app host → Speech output: hosts service
Program.cs