Speech Input Widget
Component Detail
User Interface
medium complexity
mobile
1
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
A microphone button widget that appears inside text fields (activity summary, notes) when the organization config flag for speech input is enabled. Renders interim transcription results in real time and inserts finalized text at the current cursor position, not appended to the end.
speech-input-widget
Sources & reasoning
The widget is the primary entry point for the feature - it must be invisible when the org flag is off and must insert text at cursor (not append) to support partial dictation within a longer composed text. The post-visit-only constraint from Blindeforbundet makes widget placement and activation UX critical design decisions.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Render microphone activation button only when org config flag is enabled
- Display interim STT results as streaming placeholder text in the target field
- Insert finalized transcription at cursor position on session end
- Show error state with retry prompt on recognition failure
- Hide widget entirely when org config flag is disabled
Interfaces
startListening(fieldController)
stopListening()
onInterimResult(text)
onFinalResult(text)
onError(error)