SpeechToTextService
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Wraps the device's native speech recognition API and manages the dictation session lifecycle. It normalises transcription results across platforms and returns a final transcript string for review. Errors from the underlying API are translated into user-friendly states.
speech-to-text-service
Sources & reasoning
Lines 86-88 provide the precise use-case constraint (post-interaction dictation, not live recording). Line 347 places it in Fase 2, which maps to v1.0 by ordinal. Two organizations (Blindeforbundet + HLF) endorsed it, making it a "should have" cross-org feature.
-
docs/source/likeperson.md · line 86-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
Responsibilities
- Initialise and tear down native speech recognition sessions
- Stream partial transcript results to callers during active dictation
- Return final confirmed transcript on session end
- Normalise punctuation and casing in raw transcription output
- Map native API errors to typed application error codes
Interfaces
startSession(locale: string): SpeechSession
stopSession(sessionId: string): Promise<TranscriptResult>
getPartialTranscript(sessionId: string): string
cancelSession(sessionId: string): void
isAvailable(): boolean