SpeechToTextService
Component Detail
Service Layer
medium complexity
frontendmobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Handles the translation of audio input into text by integrating with the device or platform speech recognition APIs. It enforces the constraint that recording is only permitted in post-interaction report writing contexts, not during live visits. Returns structured transcription results with confidence metadata for downstream validation.
speech-to-text-service
Sources & reasoning
Line 88 provides the definitive specification: both HLF and Blindeforbundet want speech input for post-visit report writing, with Blindeforbundet prohibiting live recording to protect open conversation. Line 347 places this in Fase 2 of the roadmap. Blueprint assigns [v1.0] matching the Fase 2 ordinal mapping.
-
docs/source/likeperson.md · line 88Begge organisasjoner ønsker mulighet for å snakke inn rapporter fremfor å skrive. Blindeforbundet understreker at opptak under selve samtalen er uønsket - tale-til-tekst er for etterpå, ved rapportskriving.
-
docs/source/likeperson.md · line 347Tale-til-tekst i rapportskriving
Responsibilities
- Interface with platform speech recognition APIs (Web Speech API, native mobile STT)
- Enforce context guard ensuring recording is only available in report-writing mode
- Process and normalize raw transcription output into clean text
- Handle recognition lifecycle including start, interim results, final result, and error states
- Provide fallback messaging when speech recognition is unavailable on the device
Interfaces
startRecognition(locale: string): RecognitionSession
stopRecognition(sessionId: string): TranscriptionResult
isAvailable(): boolean
isPermittedContext(context: AppContext): boolean
getTranscript(sessionId: string): string